Click here to Skip to main content
15,889,992 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: rand() is not random Pin
David Crow13-Feb-09 3:30
David Crow13-Feb-09 3:30 
AnswerRe: rand() is not random Pin
Rajesh R Subramanian13-Feb-09 5:15
professionalRajesh R Subramanian13-Feb-09 5:15 
QuestionTrying to create a pair of check boxes Pin
BobInNJ12-Feb-09 11:33
BobInNJ12-Feb-09 11:33 
AnswerRe: Trying to create a pair of check boxes Pin
Code-o-mat12-Feb-09 11:40
Code-o-mat12-Feb-09 11:40 
AnswerRe: Trying to create a pair of check boxes Pin
Stuart Dootson12-Feb-09 11:43
professionalStuart Dootson12-Feb-09 11:43 
QuestionChanging menus in MDI ( MFC) Pin
Like2Byte12-Feb-09 10:02
Like2Byte12-Feb-09 10:02 
QuestionNeed help on MCI functions Pin
John50212-Feb-09 9:32
John50212-Feb-09 9:32 
QuestionImpersonation via network Pin
Green Fuze12-Feb-09 9:09
Green Fuze12-Feb-09 9:09 
Hey everybody

I am writing a service that runs as the SYSTEM user (as always...).

I know how to impersonate threads to the current logged on user, but when I am connecting to a shared folder things look a bit different.

I'll explain the problem in a scenario
I am trying to open a file \\comp1\remoteFolder\file.doc, and the thread is impersonated to MYDOMAIN\user1.

MYDOMAIN\user1 has access to \\comp1\remoteFolder\file.doc.

When I am trying to open the file in the remote location, I am getting ACCESS DENIED.

trying to figure out why, I used sysinternal's filemon.
In there it writes the comment "NT_AUTHORITY\SYSTEM", which means, from what I understood, that although the thread is impersonate it access using SYSTEM.
It seems that to access the file windows checks if I have the right token (if I have access).
and HERE IS THE PROBLEM:
Why does windows says I'm SYSTEM user although the thread is impersonated?
and more than that, how do I impersonate the current user over the network ???


Thanks A LOT in advance!!!!
GF.
QuestionReadFile/WriteFile returning ERROR_INVALID_FUNCTION on USB device on Vista Pin
Keith Worden12-Feb-09 5:12
Keith Worden12-Feb-09 5:12 
AnswerRe: ReadFile/WriteFile returning ERROR_INVALID_FUNCTION on USB device on Vista Pin
Stuart Dootson12-Feb-09 6:59
professionalStuart Dootson12-Feb-09 6:59 
GeneralRe: ReadFile/WriteFile returning ERROR_INVALID_FUNCTION on USB device on Vista Pin
Keith Worden13-Feb-09 0:06
Keith Worden13-Feb-09 0:06 
GeneralRe: ReadFile/WriteFile returning ERROR_INVALID_FUNCTION on USB device on Vista Pin
Stuart Dootson13-Feb-09 0:17
professionalStuart Dootson13-Feb-09 0:17 
QuestionTCHAR as Key in a map. Pin
Comp_Users12-Feb-09 1:28
Comp_Users12-Feb-09 1:28 
GeneralRe: TCHAR as Key in a map. Pin
liangyenchyen12-Feb-09 1:40
liangyenchyen12-Feb-09 1:40 
GeneralRe: TCHAR as Key in a map. Pin
Comp_Users12-Feb-09 2:05
Comp_Users12-Feb-09 2:05 
AnswerRe: TCHAR as Key in a map. Pin
Stuart Dootson12-Feb-09 2:23
professionalStuart Dootson12-Feb-09 2:23 
GeneralRe: TCHAR as Key in a map. Pin
Comp_Users12-Feb-09 3:26
Comp_Users12-Feb-09 3:26 
AnswerRe: TCHAR as Key in a map. Pin
Cedric Moonen12-Feb-09 2:27
Cedric Moonen12-Feb-09 2:27 
AnswerRe: TCHAR as Key in a map. Pin
Eytukan12-Feb-09 2:58
Eytukan12-Feb-09 2:58 
QuestionEclipse C++ Project references Pin
gvanto12-Feb-09 1:07
gvanto12-Feb-09 1:07 
AnswerRe: Eclipse C++ Project references Pin
Stuart Dootson12-Feb-09 2:11
professionalStuart Dootson12-Feb-09 2:11 
AnswerRe: Eclipse C++ Project references Pin
CPallini12-Feb-09 2:17
mveCPallini12-Feb-09 2:17 
GeneralRe: Eclipse C++ Project references [modified] Pin
gvanto12-Feb-09 12:16
gvanto12-Feb-09 12:16 
AnswerRe: Eclipse C++ Project references Pin
gvanto12-Feb-09 13:31
gvanto12-Feb-09 13:31 
Questionmessage loop + event Pin
Vlasta_12-Feb-09 0:16
Vlasta_12-Feb-09 0:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.