Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LogonUser API
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00567273
Message ID:
00567354
Views:
21
Look up the error number...

LogonUser() may not work if the result from RevertToSelf() results in account that doesn't have rights to log on locally. I can't remember now but I tried stuff like this with IIS and it didn't work because RevertToSelf() went into the System Account which can't log on locally as another account...

+++ Rick ---

>I am trying to use the LogonUser API in my COM dll, but I can never get past the call to LogonUser. It always returns an error and lnHWND remains 0. I am running this on a win2k pro machine from the VFP7 command line. I am set up with admin rights on the machine.
>
>

>lnHWND = 0
>DECLARE integer RevertToSelf IN WIN32API
>Declare integer LogonUser in Win32API String, String, String, Double, Double,Long @
>
>=RevertToSelf()
>?LogonUser('MyAcct','MyDomain','MyPW',2,0,@lnHWND)
>?lnHWND
>

>What am I doing wrong?
>
>tia,
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Reply
Map
View

Click here to load this message in the networking platform