Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems using API
Message
From
18/08/1999 12:26:39
 
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00254972
Message ID:
00255061
Views:
20
>>I am trying to use WNetGetUser in vfp. I have declared the function before using it. But for some reason I get an error, 1726 'API Library not found'. One last note, the error does not occur till after the function has already ran and returns the correct value.
>>
>
>I think something other than this API call is at fault; the WNetGetUser code is close enough to what I use that it should run reliably (there are differences in what I do to the returned value to clean it up on a successful return, but they have no effect on how the API call is made.
>
>I would make sure that you use the code as shown; if something is issuing a CLEAR DLLS or something similar, or redeclaring the API call somewhere else after where you thought you'd already declared it, you might be getting hurt by side-effects. It's safest to issue the DECLARE...DLL in the function that uses it.
>
>>One last note, the dll hooked up is C:\Windows\System\MPR.DLL
>
>That's not always true - WinNT and Win9x use different providers for the WNet family of API calls; as long as you're using the WIN32API catchall as shown, you should be covered.
>
>If you run the code in the debugger, exactly what line does the API Library not found occur on?
>
>>
Looks like it is choking on the release library statement.

My Function follows
---------------------------------------------------------------------
set classlibr to x

o = createobject(myform) && which has the function finduser
&& also myform is modal

release libr x <----Choking right here...
---------------------------------------------------------------------
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform