Need help with WNetGetConnection_()

Just starting out? Need help? Post your questions and find answers here.
delta69
User
User
Posts: 15
Joined: Fri Apr 25, 2003 10:56 pm

Need help with WNetGetConnection_()

Post by delta69 »

Hello,

I'd like to get network connection info using WNetGetConnection_() API.
I cannot get this function working... Could someone help me ?

Thanks for your help !

Regards,
Delta69
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Post by Rings »

search the resourcesite for 'NT-Send', whichs uses a lots of those NET-APis. And of course study the M$-Documentation.
SPAMINATOR NR.1
delta69
User
User
Posts: 15
Joined: Fri Apr 25, 2003 10:56 pm

Thanks for your help, but...

Post by delta69 »

Hello,

Thanks for your help, I appreciate... But I'm afraid I've not the necessary skills to get the WNetGetConnection_() function work without additional help ... :cry:

If someone has already used this API before, I'm really intereted in seeing source code.

Regards,
Delta69
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Post by Rings »

something like this ?

Code: Select all

LenDestination=255
Source.s="D:\"
Destination.s=Space(256)
If OpenLibrary(1,"MPR.DLL")
  result=CallFunction(1,"WNetGetConnectionA",@Source.s,@Destination.s,@LenDestination) 
  ;If Result<>0 there is a Error
  MessageRequester("Info",Str(Result)+":"+Str(LenDestination),0)
Else
  Beep_(100,100)
  MessageRequester("Info","DLL not found",0)
EndIf
End
SPAMINATOR NR.1
delta69
User
User
Posts: 15
Joined: Fri Apr 25, 2003 10:56 pm

Thank you !

Post by delta69 »

Hello Rings;

Thanks a lot for your help, I made a big step !

By the way, the backslash in the source string seems unnecessary.

Once again, thank you !

Regards,
Delta69
Post Reply