Click here to Skip to main content
15,947,523 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
AnswerRe: Using CWinFormsControl in MFC Projects Pin
Nish Nishant22-Nov-06 4:49
sitebuilderNish Nishant22-Nov-06 4:49 
QuestionCreate pdf file in ANSI C Pin
c4u22-Nov-06 2:20
c4u22-Nov-06 2:20 
AnswerRe: Create pdf file in ANSI C Pin
Christian Graus23-Nov-06 9:12
protectorChristian Graus23-Nov-06 9:12 
QuestionRunning an exe from Windows Services Pin
nsurendran21-Nov-06 21:31
nsurendran21-Nov-06 21:31 
AnswerRe: Running an exe from Windows Services Pin
Michael Dunn21-Nov-06 22:38
sitebuilderMichael Dunn21-Nov-06 22:38 
GeneralRe: Running an exe from Windows Services Pin
nsurendran22-Nov-06 1:14
nsurendran22-Nov-06 1:14 
GeneralRe: Running an exe from Windows Services Pin
Michael Dunn22-Nov-06 12:21
sitebuilderMichael Dunn22-Nov-06 12:21 
QuestionRe: Running an exe from Windows Services Pin
nsurendran23-Nov-06 0:39
nsurendran23-Nov-06 0:39 
Hi ,
Thanks for the info. I wrote the code like below.
In that ArgPBU is command line args (exe name to run)
cwd is current working directory path

BOOL b;
HANDLE hToken;
HANDLE hNewToken;

b = OpenProcessToken(GetCurrentProcess(), TOKEN_ASSIGN_PRIMARY|TOKEN_DUPLICATE, &hToken);

b = DuplicateTokenEx(hToken, TOKEN_ASSIGN_PRIMARY|TOKEN_ALL_ACCESS, NULL, SecurityImpersonation, TokenPrimary, &hNewToken);

b = CreateProcessAsUser(hNewToken, NULL,ArgPBU,NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS | CREATE_NEW_CONSOLE, NULL, Cwd, &si, &m_piPBU);

CloseHandle(hNewToken);

-------------
After executing this I am getting same result. Can you help me in this regards?

Surendran N
Questionmaarunga saale Pin
golem_200621-Nov-06 19:31
golem_200621-Nov-06 19:31 
AnswerRe: maarunga saale Pin
Paul Conrad28-Nov-06 14:56
professionalPaul Conrad28-Nov-06 14:56 
QuestionUsing unmanaged libraries in C++/CLI applications Pin
Bartosz Bien21-Nov-06 10:37
Bartosz Bien21-Nov-06 10:37 
AnswerRe: Using unmanaged libraries in C++/CLI applications Pin
George L. Jackson21-Nov-06 11:08
George L. Jackson21-Nov-06 11:08 
GeneralRe: Using unmanaged libraries in C++/CLI applications Pin
Bartosz Bien30-Nov-06 12:25
Bartosz Bien30-Nov-06 12:25 
QuestionMagic Square Code Pin
XFluid20-Nov-06 1:36
XFluid20-Nov-06 1:36 
AnswerRe: Magic Square Code Pin
XFluid20-Nov-06 1:43
XFluid20-Nov-06 1:43 
GeneralRe: Magic Square Code Pin
Paul Conrad20-Nov-06 20:32
professionalPaul Conrad20-Nov-06 20:32 
AnswerRe: Magic Square Code Pin
XFluid20-Nov-06 2:03
XFluid20-Nov-06 2:03 
GeneralRe: Magic Square Code Pin
Christian Graus20-Nov-06 9:19
protectorChristian Graus20-Nov-06 9:19 
GeneralRe: Magic Square Code Pin
led mike20-Nov-06 9:30
led mike20-Nov-06 9:30 
QuestionMemory Leak Pin
BarneyGRubble19-Nov-06 13:58
BarneyGRubble19-Nov-06 13:58 
AnswerRe: Memory Leak Pin
Christian Graus19-Nov-06 14:17
protectorChristian Graus19-Nov-06 14:17 
GeneralRe: Memory Leak Pin
Nemanja Trifunovic20-Nov-06 10:51
Nemanja Trifunovic20-Nov-06 10:51 
Questioncallbacks Pin
snxxxxt17-Nov-06 2:20
snxxxxt17-Nov-06 2:20 
AnswerRe: callbacks Pin
led mike17-Nov-06 6:00
led mike17-Nov-06 6:00 
GeneralRe: callbacks Pin
snxxxxt17-Nov-06 17:41
snxxxxt17-Nov-06 17:41 

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.