Click here to Skip to main content
16,005,169 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionVersioning a Win32 DLL Pin
Rajesh_Parameswaran22-Nov-07 4:58
Rajesh_Parameswaran22-Nov-07 4:58 
AnswerRe: Versioning a Win32 DLL Pin
Mark Salsbery22-Nov-07 6:59
Mark Salsbery22-Nov-07 6:59 
QuestionAdding a Toolbar window into a MDI frame window Pin
Tien-Thong22-Nov-07 4:55
Tien-Thong22-Nov-07 4:55 
AnswerRe: Adding a Toolbar window into a MDI frame window Pin
Prasann Mayekar23-Nov-07 18:26
Prasann Mayekar23-Nov-07 18:26 
QuestionAddPrinter() fails with Error Code 126 Pin
dubbele onzin22-Nov-07 2:32
dubbele onzin22-Nov-07 2:32 
GeneralRe: AddPrinter() fails with Error Code 126 Pin
Nelek5-Dec-07 4:02
protectorNelek5-Dec-07 4:02 
QuestionIs that possible to run an EXE file that is placed inside a data file ? Pin
sdancer7522-Nov-07 2:12
sdancer7522-Nov-07 2:12 
AnswerRe: Is that possible to run an EXE file that is placed inside a data file ? Pin
Iain Clarke, Warrior Programmer22-Nov-07 3:44
Iain Clarke, Warrior Programmer22-Nov-07 3:44 
I've just been having a look at CreateProcess, and the simple answer is...

NO.

But - you can be clever...

There's nothing stopping you making a temp file from this arbitrary data, and then running create process on it.
The clever bit is to create the temp file with the FILE_FLAG_DELETE_ON_CLOSE flag set. So, after the process is started, close your handle to the file.

When the process finishes - that will close it's handle, and *poof* - file gone.

Iain.

ps. I haven't actually tried this myself, it's from reading. I look forward to your results.
pps. doing a google search for FILE_FLAG_DELETE_ON_CLOSE may give you very clear sample code.



GeneralRe: Is that possible to run an EXE file that is placed inside a data file ? Pin
sdancer7523-Nov-07 3:57
sdancer7523-Nov-07 3:57 
GeneralRe: Is that possible to run an EXE file that is placed inside a data file ? Pin
Iain Clarke, Warrior Programmer23-Nov-07 4:30
Iain Clarke, Warrior Programmer23-Nov-07 4:30 
GeneralRe: Is that possible to run an EXE file that is placed inside a data file ? Pin
sdancer7523-Nov-07 6:34
sdancer7523-Nov-07 6:34 
QuestionChecking a CWnd pointer Pin
Hadi Dayvary22-Nov-07 1:38
professionalHadi Dayvary22-Nov-07 1:38 
AnswerRe: Checking a CWnd pointer Pin
Paresh Chitte22-Nov-07 1:43
Paresh Chitte22-Nov-07 1:43 
GeneralRe: Checking a CWnd pointer Pin
Hadi Dayvary22-Nov-07 2:02
professionalHadi Dayvary22-Nov-07 2:02 
AnswerRe: Checking a CWnd pointer Pin
jhwurmbach22-Nov-07 5:43
jhwurmbach22-Nov-07 5:43 
GeneralRe: Checking a CWnd pointer Pin
Iain Clarke, Warrior Programmer22-Nov-07 6:09
Iain Clarke, Warrior Programmer22-Nov-07 6:09 
QuestionDisable Activex Controls on Another Application Pin
narayanagvs22-Nov-07 0:52
narayanagvs22-Nov-07 0:52 
QuestionHow do I create a CDialog object without showing it? Pin
arnold_w22-Nov-07 0:26
arnold_w22-Nov-07 0:26 
AnswerRe: How do I create a CDialog object without showing it? Pin
CPallini22-Nov-07 0:42
mveCPallini22-Nov-07 0:42 
GeneralRe: How do I create a CDialog object without showing it? Pin
arnold_w22-Nov-07 1:37
arnold_w22-Nov-07 1:37 
GeneralRe: How do I create a CDialog object without showing it? Pin
CPallini22-Nov-07 2:00
mveCPallini22-Nov-07 2:00 
GeneralRe: How do I create a CDialog object without showing it? Pin
Malli_S22-Nov-07 2:13
Malli_S22-Nov-07 2:13 
GeneralRe: How do I create a CDialog object without showing it? Pin
CPallini22-Nov-07 2:21
mveCPallini22-Nov-07 2:21 
GeneralRe: How do I create a CDialog object without showing it? Pin
arnold_w22-Nov-07 2:22
arnold_w22-Nov-07 2:22 
GeneralRe: How do I create a CDialog object without showing it? Pin
arnold_w22-Nov-07 2:16
arnold_w22-Nov-07 2:16 

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.