Click here to Skip to main content
16,012,611 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: About Exception in VC++ Pin
Joaquín M López Muñoz5-Feb-02 21:55
Joaquín M López Muñoz5-Feb-02 21:55 
GeneralRe: About Exception in VC++ Pin
John Clump5-Feb-02 20:55
John Clump5-Feb-02 20:55 
GeneralRe: About Exception in VC++ Pin
alex.barylski5-Feb-02 21:31
alex.barylski5-Feb-02 21:31 
GeneralTricky NT Service Question Pin
Richard Ellis5-Feb-02 19:11
Richard Ellis5-Feb-02 19:11 
GeneralRe: Tricky NT Service Question Pin
Nish Nishant5-Feb-02 20:29
sitebuilderNish Nishant5-Feb-02 20:29 
GeneralRe: Tricky NT Service Question Pin
Michael Dunn5-Feb-02 20:30
sitebuilderMichael Dunn5-Feb-02 20:30 
GeneralRe: Tricky NT Service Question Pin
Andreas Saurwein6-Feb-02 0:27
Andreas Saurwein6-Feb-02 0:27 
GeneralRe: Tricky NT Service Question Pin
Richard Ellis6-Feb-02 18:57
Richard Ellis6-Feb-02 18:57 
Thankyou very much Gentlemen for your replies.

That was enough to get me searching for a few things I had not thought of. I ended up coming across an article in MSDN that showed me how to create a process from with a NT Service. It seems to work well. FYI my code is below

STARTUPINFO si;
PROCESS_INFORMATION ProcessInformation;

si.cb = sizeof(STARTUPINFO);
si.lpReserved = NULL;
si.lpTitle = NULL;
si.lpDesktop = "WinSta0\\Default";
si.dwX = si.dwY = si.dwXSize = si.dwYSize = 0L;
si.dwFlags = STARTF_USESHOWWINDOW;
si.wShowWindow = SW_HIDE;
si.lpReserved2 = NULL;
si.cbReserved2 = 0;

if (CreateProcess(NULL, "some exe name", NULL, NULL, FALSE, 0, NULL, NULL, &si, &ProcessInformation))
{
LogText(" process created");

CloseHandle(ProcessInformation.hProcess);
CloseHandle(ProcessInformation.hThread);

} else {

LogText("CreateProcess failed. Error %d\n", GetLastError());
}



Richard Ellis.
QuestionWhat Message is issued? Pin
AnonymousBabe@usa.net5-Feb-02 16:16
AnonymousBabe@usa.net5-Feb-02 16:16 
AnswerRe: What Message is issued? Pin
Paul M Watt5-Feb-02 19:00
mentorPaul M Watt5-Feb-02 19:00 
Questionany other chinese programmer in USA ? Pin
hinasoft5-Feb-02 15:03
hinasoft5-Feb-02 15:03 
AnswerRe: any other chinese programmer in USA ? Pin
alex.barylski5-Feb-02 16:43
alex.barylski5-Feb-02 16:43 
GeneralRe: any other chinese programmer in USA ? Pin
AnonymousBabe@usa.net5-Feb-02 17:32
AnonymousBabe@usa.net5-Feb-02 17:32 
GeneralCaret and MDI View Pin
AnonymousBabe@usa.net5-Feb-02 14:15
AnonymousBabe@usa.net5-Feb-02 14:15 
GeneralSetting up CListView Properties Pin
Aaron Schaefer5-Feb-02 12:07
Aaron Schaefer5-Feb-02 12:07 
GeneralRe: Setting up CListView Properties Pin
Derek Waters5-Feb-02 12:17
Derek Waters5-Feb-02 12:17 
GeneralRe: Setting up CListView Properties Pin
Aaron Schaefer5-Feb-02 12:29
Aaron Schaefer5-Feb-02 12:29 
GeneralRe: Setting up CListView Properties Pin
Michael Dunn5-Feb-02 13:09
sitebuilderMichael Dunn5-Feb-02 13:09 
Generalchecking first char input be4 reading the rest Pin
5-Feb-02 10:18
suss5-Feb-02 10:18 
Generalhere is my code Pin
5-Feb-02 10:24
suss5-Feb-02 10:24 
GeneralDebugging Pin
Paul M Watt5-Feb-02 13:21
mentorPaul M Watt5-Feb-02 13:21 
GeneralRe: Debugging Pin
5-Feb-02 16:21
suss5-Feb-02 16:21 
GeneralRe: Debugging Pin
Christian Graus5-Feb-02 18:43
protectorChristian Graus5-Feb-02 18:43 
GeneralRe: Debugging Pin
Paul M Watt5-Feb-02 19:45
mentorPaul M Watt5-Feb-02 19:45 
GeneralRe: Debugging Pin
5-Feb-02 20:59
suss5-Feb-02 20:59 

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.