If I understand correctly, you want make the launch of the GUI of your application dependent on the authentication status of the user?!
How about an NTLM authentication with InitializeSecurityContext
on localhost?
This is how it generally works:
http://davenport.sourceforge.net/ntlm.html
And here's a reference to the method.
http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx
However, since the tokens are generated as you do the authentication,
you may want to store a challenge token locally, then generate the response token from the stored challenge token.
That way you'll always get the same response token and can use values from
it for that for some kind of encryption.
It's been a long time since I did something similar, but let me try to sum up:
1: don't know about AD, but within the NTLM authentication process you'll get a challenge token - you could store this challenge token locally and reuse it,
if you need the response token to be the same every time
2: yes - you'd need to do the NTLM stuff with C++ as it's Win32, but if you do it with managed C++, you can then use the DLL from C#.
3: yeah, the securitycontext.
I personally never worked with
http://msdn.microsoft.com/en-us/libr...8VS.71%29.aspx
Maybe that does what you want without having to switch language.