Click here to Skip to main content
15,912,897 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionis it possible to read the output from exe file in c++ Pin
Wajid Ali18-Sep-07 10:14
Wajid Ali18-Sep-07 10:14 
AnswerRe: is it possible to read the output from exe file in c++ Pin
Mark Salsbery18-Sep-07 10:24
Mark Salsbery18-Sep-07 10:24 
GeneralRe: is it possible to read the output from exe file in c++ Pin
Wajid Ali18-Sep-07 10:37
Wajid Ali18-Sep-07 10:37 
AnswerRe: is it possible to read the output from exe file in c++ Pin
Like2Byte18-Sep-07 10:28
Like2Byte18-Sep-07 10:28 
AnswerRe: is it possible to read the output from exe file in c++ Pin
David Crow18-Sep-07 11:15
David Crow18-Sep-07 11:15 
GeneralRe: is it possible to read the output from exe file in c++ Pin
Wajid Ali19-Sep-07 11:08
Wajid Ali19-Sep-07 11:08 
AnswerRe: is it possible to read the output from exe file in c++ Pin
nbugalia18-Sep-07 19:11
nbugalia18-Sep-07 19:11 
QuestionPASTE Operator Question Pin
Like2Byte18-Sep-07 9:40
Like2Byte18-Sep-07 9:40 
Hi, I've got 17 error codes to #define with some "context" for them and I'm searching for a quick way to do so.

Besides writing them out "longhand" I decided to try the paste (##) operator by doing this:

<br />
<br />
#define ERROR_CONTEXT_CODE(context,code) \<br />
    #define ERR_##context           (code+00) \<br />
    #define ERR_##context##_ERROR1  (code+01) \<br />
    #define ERR_##context##_ERROR2  (code+02) \<br />
    #define ERR_##context##_ERROR3  (code+03)<br />
<br />


I expect to have about 8 contexts and 17 error codes per context. The context is important because when there is an error I'd like to trace it back to the (code+0x) value so I'd be able to pinpoint the error to, say, file access vs HTTP access (or whatever the context is).

I intend to this code

ERROR_CONTEXT_CODE(FILE,7100)
ERROR_CONTEXT_CODE(HTTP,7200)

to output:

<br />
    #define ERR_FILE          (7100+00) \<br />
    #define ERR_FILE_ERROR1   (7100+01) \<br />
    #define ERR_FILE_ERROR2   (7100+02) \<br />
    #define ERR_FILE_ERROR3   (7100+03)<br />
<br />
    #define ERR_HTTP          (7200+00) \<br />
    #define ERR_HTTP_ERROR1   (7200+01) \<br />
    #define ERR_HTTP_ERROR2   (7200+02) \<br />
    #define ERR_HTTP_ERROR3   (7200+03)<br />


I *think* I've made my intention clear at this point.

How can I accomplish this? I was thinking of incorporating the stringize(#) and paste(##) operators to do this.

(ed-Fixed a copy/paste error in second code block)
QuestionWS_EX_COMPOSITED Pin
Californian218-Sep-07 8:11
Californian218-Sep-07 8:11 
AnswerRe: WS_EX_COMPOSITED Pin
Mark Salsbery18-Sep-07 8:49
Mark Salsbery18-Sep-07 8:49 
GeneralRe: WS_EX_COMPOSITED Pin
Californian218-Sep-07 9:25
Californian218-Sep-07 9:25 
GeneralRe: WS_EX_COMPOSITED Pin
Mark Salsbery18-Sep-07 9:38
Mark Salsbery18-Sep-07 9:38 
GeneralRe: WS_EX_COMPOSITED Pin
Californian218-Sep-07 10:03
Californian218-Sep-07 10:03 
GeneralRe: WS_EX_COMPOSITED Pin
Mark Salsbery18-Sep-07 10:19
Mark Salsbery18-Sep-07 10:19 
GeneralRe: WS_EX_COMPOSITED [modified] Pin
Californian219-Sep-07 6:06
Californian219-Sep-07 6:06 
Questiondata types conversion Pin
shpid3r18-Sep-07 7:56
shpid3r18-Sep-07 7:56 
AnswerRe: data types conversion Pin
DevMentor.org18-Sep-07 8:02
DevMentor.org18-Sep-07 8:02 
QuestionRe: data types conversion Pin
shpid3r18-Sep-07 8:34
shpid3r18-Sep-07 8:34 
AnswerRe: data types conversion Pin
DevMentor.org18-Sep-07 8:43
DevMentor.org18-Sep-07 8:43 
GeneralRe: data types conversion Pin
shpid3r18-Sep-07 9:04
shpid3r18-Sep-07 9:04 
QuestionRe: data types conversion Pin
shpid3r18-Sep-07 9:11
shpid3r18-Sep-07 9:11 
GeneralRe: data types conversion Pin
DevMentor.org18-Sep-07 9:30
DevMentor.org18-Sep-07 9:30 
AnswerDWORD Solved. How about double and SYSTEMTIME [modified] Pin
shpid3r19-Sep-07 0:29
shpid3r19-Sep-07 0:29 
GeneralRe: DWORD Solved. How about double and SYSTEMTIME Pin
DevMentor.org19-Sep-07 8:52
DevMentor.org19-Sep-07 8:52 
AnswerAll Issues Solved. 10x for support Pin
shpid3r19-Sep-07 10:53
shpid3r19-Sep-07 10:53 

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.