>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,
Does the admin account have permission to act as part of the operating system? If not, then this won't work. LogonUser needs this access right.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao