>>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.
Thanks, I guess I was typing before I was looking. That worked.
Greg Reichert