Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WNetGetConnection woes
Message
General information
Forum:
ASP.NET
Category:
Troubleshooting
Environment versions
Environment:
VB 9.0
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01511311
Message ID:
01511315
Views:
33
>I am getting an unexpected error when calling a know API function. "Unable to find an entry point named 'WNetGetConnection' in DLL 'mpr.dll'."
>
>Here is the text code that reproduces the error on my machine. Am I missing some Reference or something? All web articles make no mention of needing anything but the declaration at the top of the code. (p.s. the mapped drive does exist.)
>
>
>Module Module1
>    Public Declare Function WNetGetConnection Lib "mpr.dll" Alias "WNetGetConnection" (ByVal localName As String, ByVal remoteName As Text.StringBuilder, ByRef length As Integer) As Integer
>
>
Try this instead:
Public Declare Function WNetGetConnection Lib "mpr.dll" Alias "WNetGetConnectionA" (ByVal localName As String, ByVal remoteName As Text.StringBuilder, ByRef length As Integer) As Integer
Note the "A" at the end of the Alias.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform