|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
CFileDialog and ImpersonateLoggedOnUser on Win2k systemI am facing a problem with CFileDialog and ImpersonateLoggedOnUser on Win2k system. I wrote a small program to run on Win2k, after starting the application from Non-Adminstrator account, can run and open some administrator restricted files after giving Adimistrator user name and password. For that I use ImpersonateLoggedOnUser. But CFileDialog fuction fails when you login using administrator account. Any Idea why this is happening. here is how I used these calls: HANDLE hToken; BOOL ret = LogonUser((char *)((const char *)m_sUsername), ".", (char *)((const char *)m_sPassword), LOGON32_LOGON_BATCH, LOGON32_PROVIDER_DEFAULT, &hToken); if(!ret) { AfxMessageBox("test", MB_OK|MB_ICONWARNING); return; } else { ImpersonateLoggedOnUser(hToken); } CFileDialog OpenDlg(TRUE, NULL, NULL,OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT, NULL, NULL); if(OpenDlg.DoModal()== IDOK){ file=ppdOpenDlg.GetFileName(); } One widows 2000 system, this OpenDlg.DoModal() fails with return value 2, which says " system can not open the specified file". Did anybody face this problem? Any type of help is highly appriciated. Thanks in advance Jijo ----------------------- Posted by a user from .NET 247 (http://www.dotnet247.com/) <Id>D50dyapCZkmih2sRGKSdTQ==</Id>
IIS Authentication Problem?
get remote server's SSL public key SignedXml fails under .NET 2.0 Beta WinForms App Security Error .NET thin control & IE Single-sign-on .NET GUI to J2EE server PrincipalPermission.Demand() returns: Request for principal permission failed Assymetric encryption - building an interopable solution that works with .NET/Java/OpenSSL StrongNameIdentityPermission and Web Services Security problem while accessing web page with web request within windows .net control |
|||||||||||||||||||||||