Sorry, I wholly intended to put my error in; when it came to it my mind was elsewhere...
At line: 332 (in my listing)
if (status != OSCalls.WinStatusCodes.STATUS_SUCCESS)
throw new System.ComponentModel.Win32Exception((int)OSCalls.LsaNtStatusToWinError(status)); // ERROR HERE !!!
if (profileBuffer != IntPtr.Zero)
OSCalls.LsaFreeReturnBuffer(profileBuffer);
}
Error thrown in output window:
DefaultDomain: Loaded c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll, No symbols loaded.
BtLock: Loaded C:\Projects\BtLock\bin\Debug\BtLock.exe, Symbols loaded.
BtLock.exe: Loaded c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll, No symbols loaded.
An unhandled exception of type System.ComponentModel.Win32Exception occurred in BtLock.exe
Additional information: A logon request contained an invalid logon type value
Unhandled Exception: System.ComponentModel.Win32Exception: A logon request contained an invalid logon type value
at BtLock.HandleSecurityToken..ctor(String UserName, String Domain, WinLogonType LogonType) in c:\projects\btlock\unlock.cs:line 332
at BtLock.CCWinLogonUtilities.CreateIdentityS4U(NetworkCredential credential, WinLogonType logonType) in c:\projects\btlock\unlock.cs:line 432
at BtLock.Lock.Main(String[] args) in C:\Projects\BtLock\Lock.cs:line 20The program [292] BtLock.exe has exited with code 0 (0x0).