>Hi Ed,
>
>please help my out here.
>
>I have use your routine demo_wnetaddconnection3, but how can I access the data??
>
>This is my line of code:
>? demo_wnetaddconnection3("J:","\\129.142.140.215\dbtest","dbtest","dbtest")
>*Returns a number > 0
>
If running under Win9x, you can't use an IP Address as a part of a UNC. You have to rely on LMHOSTS to map a NetBIOS name to the IP Address and use the NetBIOS name in the UNC. You must have the account "dbtest" with a password of "dbtest" on the target machine with rights to the predefined share \\
machinename\dbtest
The value returned from the function is the API call error code, which you can look up to see what the error means; it's defined in WINERROR.H if nowhere else. The error code should indicate what you have wrong, and you have the source - there is no magic.
If the function returns 0, then the drive letter is mapped to the UNC as requested; if you've not mapped to a drive letter, your access to the UNC is authenticated, and the UNC is usable in a path.
It's in the PD with source so that you can make it work; I am not in a position to provide infinite support and modification to it for free. I do consulting on API and COM implementation for a living, so if you'd like to hire a consultant to do your work for you, you're welcome to hire me...