Click here to Skip to main content
15,899,754 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: LinearGradientMode equivalent in VC++ 6.0 Pin
Michael Dunn8-Nov-07 21:43
sitebuilderMichael Dunn8-Nov-07 21:43 
AnswerRe: LinearGradientMode equivalent in VC++ 6.0 Pin
Try8-Nov-07 22:07
Try8-Nov-07 22:07 
GeneralRe: LinearGradientMode equivalent in VC++ 6.0 Pin
bob169729-Nov-07 2:04
bob169729-Nov-07 2:04 
QuestionGetPrivateProfileSection Pin
rp_suman8-Nov-07 20:41
rp_suman8-Nov-07 20:41 
AnswerRe: GetPrivateProfileSection Pin
Hamid_RT8-Nov-07 21:13
Hamid_RT8-Nov-07 21:13 
AnswerRe: GetPrivateProfileSection Pin
CPallini8-Nov-07 21:21
mveCPallini8-Nov-07 21:21 
QuestionKnow loggedon user from a Service? Pin
SOAD_8-Nov-07 20:26
SOAD_8-Nov-07 20:26 
AnswerRe: Know loggedon user from a Service? Pin
Blake Miller16-Nov-07 5:10
Blake Miller16-Nov-07 5:10 
From MSDN:

Use WTSEnumerateSessions function to retrieve a list of sessions on a specified terminal server.
Or use WTSGetActiveConsoleSessionId function to retrieve the Terminal Services session currently attached to the physical console. The physical console is the monitor, keyboard, and mouse. Note that it is not necessary that Terminal Services be running for this function to succeed. Then use
WTSQueryUserToken function to obtain the primary access token of the logged-on user specified by the session ID. To call this function successfully, the calling application must be running within the context of the LocalSystem account and have the SE_TCB_NAME privilege. It is not necessary that Terminal Services be running for the function to succeed, but if Terminal Services is not running, the only valid session identifier is zero (0). Windows Vista and Windows Server "Longhorn" allow only services and processes started by services to run in session zero.

Caution WTSQueryUserToken is intended for highly trusted services. Service providers must use caution that they do not leak user tokens when calling this function. Service providers must close token handles after they have finished with them.
GeneralRe: Know loggedon user from a Service? Pin
SOAD_20-Nov-07 2:25
SOAD_20-Nov-07 2:25 
GeneralRe: Know loggedon user from a Service? Pin
Blake Miller20-Nov-07 4:50
Blake Miller20-Nov-07 4:50 
QuestionExtract the file name from the full file path Pin
CodingLover8-Nov-07 16:41
CodingLover8-Nov-07 16:41 
AnswerRe: Extract the file name from the full file path Pin
Llasus8-Nov-07 16:59
Llasus8-Nov-07 16:59 
GeneralRe: Extract the file name from the full file path Pin
CodingLover8-Nov-07 17:24
CodingLover8-Nov-07 17:24 
GeneralRe: Extract the file name from the full file path Pin
Llasus8-Nov-07 17:35
Llasus8-Nov-07 17:35 
GeneralRe: Extract the file name from the full file path Pin
CodingLover8-Nov-07 17:55
CodingLover8-Nov-07 17:55 
GeneralRe: Extract the file name from the full file path Pin
Luc Pattyn8-Nov-07 18:00
sitebuilderLuc Pattyn8-Nov-07 18:00 
GeneralRe: Extract the file name from the full file path Pin
CodingLover8-Nov-07 18:10
CodingLover8-Nov-07 18:10 
GeneralRe: Extract the file name from the full file path Pin
Nelek8-Nov-07 21:52
protectorNelek8-Nov-07 21:52 
QuestionRe: Extract the file name from the full file path Pin
David Crow9-Nov-07 4:23
David Crow9-Nov-07 4:23 
GeneralRe: Extract the file name from the full file path Pin
CodingLover8-Nov-07 19:50
CodingLover8-Nov-07 19:50 
GeneralRe: Extract the file name from the full file path Pin
Llasus8-Nov-07 20:11
Llasus8-Nov-07 20:11 
GeneralRe: Extract the file name from the full file path Pin
CodingLover8-Nov-07 21:22
CodingLover8-Nov-07 21:22 
QuestionRe: Extract the file name from the full file path Pin
Hamid_RT8-Nov-07 20:17
Hamid_RT8-Nov-07 20:17 
AnswerRe: Extract the file name from the full file path Pin
CodingLover8-Nov-07 21:24
CodingLover8-Nov-07 21:24 
GeneralRe: Extract the file name from the full file path Pin
David Crow9-Nov-07 4:18
David Crow9-Nov-07 4:18 

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.