WP
2010-04-29 15:01:25 UTC
Hi folks,
I run a VFP9 SP2 application with impersonation. So the first sentence in my
menu.mpr is:
IF
LogonUser("specialuser","MyDomain","superpassword",LOGON32_LOGON_INTERACTIVE,
LOGON32_PROVIDER_DEFAULT, @nToken) = 0
MESSAGEBOX("Failed to authenticate. Unable to continue",16,"Zest",0)
RETURN
ENDIF
IF ImpersonateLoggedOnUser(nToken) = 0
MESSAGEBOX("Failed to authenticate. Unable to continue",16,"Zest",0)
RETURN
ENDIF
Then, as soon as a WAIT WINDOW "mymessage" appears, the little window on the
top right side of the screen appears, but it appears empty, and the program
hangs.
Same thing happens if immediately after the impersonation I put a SET STEP
ON to follow the program in the debugger window: as soon as I click on a
menu in the debugger, the program hangs.
What's going on here? Does impersonation not work properly?
I run a VFP9 SP2 application with impersonation. So the first sentence in my
menu.mpr is:
IF
LogonUser("specialuser","MyDomain","superpassword",LOGON32_LOGON_INTERACTIVE,
LOGON32_PROVIDER_DEFAULT, @nToken) = 0
MESSAGEBOX("Failed to authenticate. Unable to continue",16,"Zest",0)
RETURN
ENDIF
IF ImpersonateLoggedOnUser(nToken) = 0
MESSAGEBOX("Failed to authenticate. Unable to continue",16,"Zest",0)
RETURN
ENDIF
Then, as soon as a WAIT WINDOW "mymessage" appears, the little window on the
top right side of the screen appears, but it appears empty, and the program
hangs.
Same thing happens if immediately after the impersonation I put a SET STEP
ON to follow the program in the debugger window: as soon as I click on a
menu in the debugger, the program hangs.
What's going on here? Does impersonation not work properly?