Trying to write a test program using libsmbclient.
Stephen Boyer
sboyer at calderasystems.com
Tue May 1 16:49:39 GMT 2001
Roy,
Yes, you have to call smbc_init() first in order to initialize the library
and indicate the call back function. You also need a .smb/smb.conf
file in your HOME directory with nothing more than the following:
[global]
workgroup = WORKGROUP
In the HEAD /samba/testsuite/libsmbclient/src are examples/testprograms
that exercise all of the available libsmbclient APIs.
>Date: Tue, 1 May 2001 08:03:59 -0700 (PDT)
>From: Ray Van Dolson <rayvd at bludgeon.org>
>To: <samba-technical at samba.org>
>Subject: Trying to write a test program using libsmbclient.
>I'm trying to write a test program using libsmbclient and the simplest
>things aren't working quite the way it seems they should.
>#include <libsmbclient.h>
>#include <stdio.h>
>int main() {
> printf("%d\n",smbc_open("smb://TULCATE/Mp3"));
>}
>% gcc -o bob test.c -lsmbclient
>% ./bob
>-1
>%
>It returns -1 for any URI I throw in there. These URI's work fine when
>used with smbclient directly, so I think I may be doing something wrong.
>Do I need to call smbc_init() first?
>Ray Van Dolson
More information about the samba-technical
mailing list