connecting from a C program under Windows
Service Informatique CHSR
chsrinfo at guetali.fr
Sun Jun 14 22:21:56 GMT 1998
This question is only partly related to Samba, so I apology, but I do
believe that someone among you is able to answer me.
I want to connect a network drive to a samba share (security = user) from a
C program under Windows 95. Here is the code:
LPSTR user="someuser", password="pass";
result=WNetAddConnection2(&nr, user, password,0);
But the result is always ERROR_INVALID_PASSWORD, as if it fails in
SMBsessionsetupX. I think so because after I do any connection from the
Windows 95 explorer to SERVER, my code successfully connect to any share
with *any* user/password pair.
So, I believe WNetAddConnection2 works in a security = share manner.
Does anyone know how to do the trick?
More information about the samba