Click here to Skip to main content
15,891,423 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC MSG Pin
ANDYFA29-Sep-04 7:39
ANDYFA29-Sep-04 7:39 
GeneralRe: MFC MSG Pin
David Crow29-Sep-04 7:43
David Crow29-Sep-04 7:43 
GeneralReading from the port Pin
mithuna29-Sep-04 1:14
mithuna29-Sep-04 1:14 
GeneralDataBase management - MS Excel Pin
Daniel Kanev29-Sep-04 1:08
Daniel Kanev29-Sep-04 1:08 
GeneralRe: DataBase management - MS Excel Pin
David Crow29-Sep-04 4:49
David Crow29-Sep-04 4:49 
QuestionHow to start a PC/Application from Program Pin
Billar29-Sep-04 0:43
Billar29-Sep-04 0:43 
AnswerRe: How to start a PC/Application from Program Pin
22491729-Sep-04 2:04
22491729-Sep-04 2:04 
GeneralRe: How to start a PC/Application from Program Pin
vcplusplus29-Sep-04 3:12
vcplusplus29-Sep-04 3:12 
If you are using NT/2000/XP, you will need to set privileges.
DWORD dwVersion = GetVersion();

if ( dwVersion < 0x80000000)
{
            // NT/2000/XP
    HANDLE hToken;
    LUID tmpLuid;

    HANDLE handleProcess=GetCurrentProcess();

    if (!OpenProcessToken(handleProcess,TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
        return;

    if (!LookupPrivilegeValue(0,"SeShutdownPrivilege", &tmpLuid))
        return;

    TOKEN_PRIVILEGES NewState;
    LUID_AND_ATTRIBUTES luidattr;

    NewState.PrivilegeCount = 1;
    luidattr.Luid=tmpLuid;
    luidattr.Attributes=SE_PRIVILEGE_ENABLED;
    NewState.Privileges[0]=luidattr;

    if (!AdjustTokenPrivileges(hToken, false, &NewState, sizeof(TOKEN_PRIVILEGES), 0, 0))
        return;
}
ExitWindowsEx(...);

GeneralRe: How to start a PC/Application from Program Pin
Billar30-Sep-04 2:33
Billar30-Sep-04 2:33 
AnswerRe: How to start a PC/Application from Program Pin
David Crow29-Sep-04 4:52
David Crow29-Sep-04 4:52 
GeneralRe: How to start a PC/Application from Program Pin
Billar30-Sep-04 2:18
Billar30-Sep-04 2:18 
QuestionAlternative to SetCursorPos? Pin
Zee man28-Sep-04 23:42
Zee man28-Sep-04 23:42 
AnswerRe: Alternative to SetCursorPos? Pin
Budric B.29-Sep-04 3:24
Budric B.29-Sep-04 3:24 
GeneralRe: Alternative to SetCursorPos? Pin
Zee man29-Sep-04 7:58
Zee man29-Sep-04 7:58 
GeneralImage List and managed extensions problem Pin
sv2george28-Sep-04 23:33
sv2george28-Sep-04 23:33 
GeneralRe: Image List and managed extensions problem (Dirty solution!) Pin
sv2george29-Sep-04 0:50
sv2george29-Sep-04 0:50 
QuestionHow to get volume letter of a USB disk ? Pin
Amanda Davis28-Sep-04 23:25
Amanda Davis28-Sep-04 23:25 
AnswerRe: How to get volume letter of a USB disk ? Pin
JimmyRopes29-Sep-04 3:23
professionalJimmyRopes29-Sep-04 3:23 
GeneralHelp me,please! the parameter nEscape Pin
Guoguor28-Sep-04 22:49
Guoguor28-Sep-04 22:49 
GeneralRe: Help me,please! the parameter nEscape Pin
Sujan Christo28-Sep-04 23:19
Sujan Christo28-Sep-04 23:19 
GeneralNeed help to understand the MAKE utility in VS.Net. Pin
Link260028-Sep-04 22:21
Link260028-Sep-04 22:21 
GeneralRe: Need help to understand the MAKE utility in VS.Net. Pin
Andrew Walker29-Sep-04 2:30
Andrew Walker29-Sep-04 2:30 
GeneralText Editors developed in VC++ Pin
SVPG28-Sep-04 22:14
SVPG28-Sep-04 22:14 
GeneralProblem using Visual Studio.Net 03 in command-line prompt. Pin
Link260028-Sep-04 22:11
Link260028-Sep-04 22:11 
GeneralRe: Problem using Visual Studio.Net 03 in command-line prompt. Pin
Sujan Christo28-Sep-04 23:14
Sujan Christo28-Sep-04 23:14 

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.