Click here to Skip to main content
15,914,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralPrivate dial-up connection Pin
mickeg8-Nov-04 21:15
mickeg8-Nov-04 21:15 
QuestionHow can I Distribute N rectangles into one rectangle in most appropriate manner? Pin
mfc_surfer8-Nov-04 19:59
mfc_surfer8-Nov-04 19:59 
AnswerRe: How can I Distribute N rectangles into one rectangle in most appropriate manner? Pin
BlackDice9-Nov-04 3:13
BlackDice9-Nov-04 3:13 
GeneralRe: How can I Distribute N rectangles into one rectangle in most appropriate manner? Pin
mfc_surfer9-Nov-04 18:33
mfc_surfer9-Nov-04 18:33 
GeneralRe: How can I Distribute N rectangles into one rectangle in most appropriate manner? Pin
mfc_surfer9-Nov-04 18:33
mfc_surfer9-Nov-04 18:33 
GeneralTo get current Login User name from within a service. Pin
e_prabhu8-Nov-04 19:53
e_prabhu8-Nov-04 19:53 
GeneralRe: To get current Login User name from within a service. Pin
vilmer8-Nov-04 21:21
vilmer8-Nov-04 21:21 
GeneralRe: To get current Login User name from within a service. Pin
ThatsAlok8-Nov-04 22:36
ThatsAlok8-Nov-04 22:36 
vilmer wrote:
you can try to access the windows register at
\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer
and catch the value of Logon User Name key.


Your Approch is right,but from the service this approach is wrong.if you try to open HKEY_CURRENT_USER from service instead of opening of that it open HKEY_USER/.Default. you can try. because sevices start before logon,on logon OS decide which is current user whihc registry setting he is going to use.

now question arise how to open the current user from service
solution is right there HKEY_USERS\{Current Logon USER SID}\is TRUE replica for HKEY_CURRENT_USER



-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
GeneralRe: To get current Login User name from within a service. Pin
ThatsAlok8-Nov-04 22:36
ThatsAlok8-Nov-04 22:36 
GeneralRe: To get current Login User name from within a service. Pin
ThatsAlok8-Nov-04 22:39
ThatsAlok8-Nov-04 22:39 
GeneralRe: To get current Login User name from within a service. Pin
David Crow9-Nov-04 2:36
David Crow9-Nov-04 2:36 
GeneralRe: To get current Login User name from within a service. Pin
2249179-Nov-04 4:56
2249179-Nov-04 4:56 
GeneralInstallation and uninstallation application Pin
Rajesh_K_Sharma8-Nov-04 18:23
Rajesh_K_Sharma8-Nov-04 18:23 
GeneralRe: Installation and uninstallation application Pin
includeh109-Nov-04 2:06
includeh109-Nov-04 2:06 
GeneralHandling of resizing the view and controls for different screen resolutions Pin
ledallam8-Nov-04 17:23
ledallam8-Nov-04 17:23 
GeneralQuestion about random access file. Pin
momer8-Nov-04 16:45
momer8-Nov-04 16:45 
GeneralRe: Question about random access file. Pin
David Crow9-Nov-04 2:49
David Crow9-Nov-04 2:49 
QuestionHow to get the listbox multi-select item number and content Pin
RobertHuang8-Nov-04 15:58
RobertHuang8-Nov-04 15:58 
AnswerRe: How to get the listbox multi-select item number and content Pin
David Crow9-Nov-04 2:51
David Crow9-Nov-04 2:51 
GeneralC++ and Java Pin
asv8-Nov-04 14:55
asv8-Nov-04 14:55 
GeneralRe: C++ and Java Pin
jan larsen8-Nov-04 21:50
jan larsen8-Nov-04 21:50 
Generalconversion from Ascii to decimal... Pin
Ann668-Nov-04 14:33
sussAnn668-Nov-04 14:33 
GeneralRe: conversion from Ascii to decimal... Pin
Chris Losinger8-Nov-04 16:00
professionalChris Losinger8-Nov-04 16:00 
GeneralRe: conversion from Ascii to decimal... Pin
ThatsAlok8-Nov-04 18:21
ThatsAlok8-Nov-04 18:21 
Generalpopup menu on Windows explorer Pin
includeh108-Nov-04 13:38
includeh108-Nov-04 13:38 

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.