Click here to Skip to main content
12,403,948 members (68,966 online)

C / C++ / MFC

 
AnswerRe: do-while did not work in eclipse c\c++ IDE ? Pin
Richard MacCutchan26-Nov-12 8:00
mvpRichard MacCutchan26-Nov-12 8:00 
GeneralRe: do-while did not work in eclipse c\c++ IDE ? Pin
ho_khalaf26-Nov-12 8:12
memberho_khalaf26-Nov-12 8:12 
GeneralRe: do-while did not work in eclipse c\c++ IDE ? Pin
Richard MacCutchan26-Nov-12 8:14
mvpRichard MacCutchan26-Nov-12 8:14 
GeneralRe: do-while did not work in eclipse c\c++ IDE ? Pin
ho_khalaf26-Nov-12 8:16
memberho_khalaf26-Nov-12 8:16 
GeneralRe: do-while did not work in eclipse c\c++ IDE ? Pin
ho_khalaf26-Nov-12 8:20
memberho_khalaf26-Nov-12 8:20 
GeneralRe: do-while did not work in eclipse c\c++ IDE ? Pin
Richard MacCutchan26-Nov-12 8:22
mvpRichard MacCutchan26-Nov-12 8:22 
GeneralRe: do-while did not work in eclipse c\c++ IDE ? Pin
ho_khalaf26-Nov-12 8:27
memberho_khalaf26-Nov-12 8:27 
GeneralRe: do-while did not work in eclipse c\c++ IDE ? Pin
Richard MacCutchan26-Nov-12 8:57
mvpRichard MacCutchan26-Nov-12 8:57 
AnswerRe: do-while did not work in eclipse c\c++ IDE ? Pin
DavidCrow26-Nov-12 10:37
memberDavidCrow26-Nov-12 10:37 
GeneralRe: do-while did not work in eclipse c\c++ IDE ? Pin
ho_khalaf26-Nov-12 10:45
memberho_khalaf26-Nov-12 10:45 
GeneralRe: do-while did not work in eclipse c\c++ IDE ? Pin
ho_khalaf26-Nov-12 12:02
memberho_khalaf26-Nov-12 12:02 
GeneralRe: do-while did not work in eclipse c\c++ IDE ? Pin
DavidCrow26-Nov-12 16:39
memberDavidCrow26-Nov-12 16:39 
GeneralRe: do-while did not work in eclipse c\c++ IDE ? Pin
ho_khalaf26-Nov-12 19:26
memberho_khalaf26-Nov-12 19:26 
QuestionC++: CreateProcess() launching child applications with UAC dialog for once Pin
Farrukhw25-Nov-12 23:58
memberFarrukhw25-Nov-12 23:58 
Dear Community,

I'm using C++ to develop a small Bootstrapper (Setup.exe) application in C++. Using CreateProcess() to launch a .hta (HTML Application) which is used as a UI. It then calls other installers one by one which includes *.exe, *.msi etc.

What I'm trying to do is if I execute my Setup.exe, it asked for UAC for once and launch .hta so that it doesn't required UAC any further. Here is my code:
 STARTUPINFO si;
    PROCESS_INFORMATION pi;
 
    ZeroMemory( &si, sizeof(si) );
    si.cb = sizeof(si);
	
    ZeroMemory( &pi, sizeof(pi) );
	
 
	if( CreateProcess(NULL,   // No module name (use command line)
       "C:\\Windows\\MsHta.exe SetupGUI.hta"    // Command line
,
        NULL,           // Process handle not inheritable
        NULL,           // Thread handle not inheritable
        FALSE,          // Set handle inheritance to FALSE
        0,              // No creation flags
        NULL,           // Use parent's environment block
        NULL,           // Use parent's starting directory 
        &si,            // Pointer to STARTUPINFO structure
        &pi            // Pointer to PROCESS_INFORMATION structure
		))
	{
 
	// Wait until child process exits.
    WaitForSingleObject(pi.hProcess, INFINITE );
 
    // Close process and thread handles. 
    CloseHandle( pi.hProcess );
    CloseHandle( pi.hThread );

I actually saw same in an application installer, but I don't have its Setup.exe's source code.

Thanks a lot.

Farrukh
AnswerRe: C++: CreateProcess() launching child applications with UAC dialog for once Pin
Andrew Cherednik26-Nov-12 12:21
memberAndrew Cherednik26-Nov-12 12:21 
QuestionHow to use NTGraph3D Activex Control in Visual Studio 2010. Pin
DhrumilS23-Nov-12 0:48
memberDhrumilS23-Nov-12 0:48 
AnswerRe: How to use NTGraph3D Activex Control in Visual Studio 2010. Pin
Richard MacCutchan23-Nov-12 1:43
mvpRichard MacCutchan23-Nov-12 1:43 
QuestionHow to get a ip address from system name Pin
D.Manivelan22-Nov-12 22:20
memberD.Manivelan22-Nov-12 22:20 
AnswerRe: How to get a ip address from system name Pin
msr_codeproject22-Nov-12 23:23
membermsr_codeproject22-Nov-12 23:23 
AnswerRe: How to get a ip address from system name Pin
Rolf Kristensen23-Nov-12 0:41
memberRolf Kristensen23-Nov-12 0:41 
QuestionHeap corruption problem after AfxBeginThread? Pin
bosfan22-Nov-12 21:14
memberbosfan22-Nov-12 21:14 
AnswerRe: Heap corruption problem after AfxBeginThread? Pin
sirama200422-Nov-12 22:13
membersirama200422-Nov-12 22:13 
AnswerRe: Heap corruption problem after AfxBeginThread? Pin
Richard MacCutchan22-Nov-12 23:40
mvpRichard MacCutchan22-Nov-12 23:40 
GeneralRe: Heap corruption problem after AfxBeginThread? Pin
bosfan22-Nov-12 23:44
memberbosfan22-Nov-12 23:44 
AnswerRe: Heap corruption problem after AfxBeginThread? Pin
BilliousBob23-Nov-12 4:49
memberBilliousBob23-Nov-12 4:49 
AnswerRe: Heap corruption problem after AfxBeginThread? Pin
Stephen Hewitt25-Nov-12 7:04
memberStephen Hewitt25-Nov-12 7:04 
QuestionWhat are the steps required, i will connect to the SQL named instance server using the "CDatabase::OpenEx" by using the DNS Name? Pin
lucky_122122-Nov-12 0:41
memberlucky_122122-Nov-12 0:41 
AnswerRe: What are the steps required, i will connect to the SQL named instance server using the "CDatabase::OpenEx" by using the DNS Name? Pin
Richard MacCutchan22-Nov-12 3:38
mvpRichard MacCutchan22-Nov-12 3:38 
QuestionChanging Dialog Button Color at runTime Pin
yogeshs20-Nov-12 23:07
memberyogeshs20-Nov-12 23:07 
AnswerRe: Changing Dialog Button Color at runTime Pin
manoranjan21-Nov-12 0:05
membermanoranjan21-Nov-12 0:05 
GeneralRe: Changing Dialog Button Color at runTime Pin
yogeshs21-Nov-12 0:37
memberyogeshs21-Nov-12 0:37 
GeneralRe: Changing Dialog Button Color at runTime Pin
manoranjan21-Nov-12 1:12
membermanoranjan21-Nov-12 1:12 
GeneralRe: Changing Dialog Button Color at runTime Pin
yogeshs21-Nov-12 18:56
memberyogeshs21-Nov-12 18:56 
GeneralRe: Changing Dialog Button Color at runTime Pin
manoranjan21-Nov-12 19:40
membermanoranjan21-Nov-12 19:40 
QuestionPng Image button problem. Pin
yu-jian20-Nov-12 6:53
groupyu-jian20-Nov-12 6:53 
QuestionMinimize CDialog Problem Pin
yu-jian20-Nov-12 6:22
groupyu-jian20-Nov-12 6:22 
AnswerRe: Minimize CDialog Problem Pin
jeron120-Nov-12 6:31
memberjeron120-Nov-12 6:31 
QuestionRe: Minimize CDialog Problem Pin
Maximilien20-Nov-12 8:26
memberMaximilien20-Nov-12 8:26 
QuestionCheck if a character is lowercase and change to uppercase. Pin
MitchG92_2420-Nov-12 0:49
memberMitchG92_2420-Nov-12 0:49 
AnswerRe: Check if a character is lowercase and change to uppercase. Pin
MitchG92_2420-Nov-12 0:56
memberMitchG92_2420-Nov-12 0:56 
AnswerRe: Check if a character is lowercase and change to uppercase. Pin
sajeesh.c20-Nov-12 17:34
membersajeesh.c20-Nov-12 17:34 
GeneralRe: Check if a character is lowercase and change to uppercase. Pin
Richard MacCutchan20-Nov-12 21:31
mvpRichard MacCutchan20-Nov-12 21:31 
QuestionIs it possible to capture an HD video/ to generate videos in HD in C++/VC++/MFC.? Pin
mbatra3119-Nov-12 22:15
membermbatra3119-Nov-12 22:15 
QuestionProblem with string conversion Pin
HungryCPPDev19-Nov-12 19:08
memberHungryCPPDev19-Nov-12 19:08 
AnswerRe: Problem with string conversion Pin
Jochen Arndt19-Nov-12 21:40
memberJochen Arndt19-Nov-12 21:40 
GeneralRe: Problem with string conversion Pin
HungryCPPDev20-Nov-12 18:05
memberHungryCPPDev20-Nov-12 18:05 
GeneralRe: Problem with string conversion Pin
Jochen Arndt22-Nov-12 2:52
memberJochen Arndt22-Nov-12 2:52 
QuestionHow to set the alignment of items of CListCtrl Pin
rahul.kulshreshtha19-Nov-12 16:43
memberrahul.kulshreshtha19-Nov-12 16:43 
AnswerRe: How to set the alignment of items of CListCtrl Pin
Richard MacCutchan19-Nov-12 22:50
mvpRichard MacCutchan19-Nov-12 22:50 
GeneralRe: How to set the alignment of items of CListCtrl Pin
rahul.kulshreshtha19-Nov-12 23:22
memberrahul.kulshreshtha19-Nov-12 23:22 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.160721.1 | Last Updated 28 Jul 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid