Click here to Skip to main content
15,924,318 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: mailto: question Pin
RobJones14-Sep-01 7:06
RobJones14-Sep-01 7:06 
GeneralRichEdit text always selected when page becomes Active Pin
Bryan Anslow14-Sep-01 6:20
Bryan Anslow14-Sep-01 6:20 
GeneralRe: RichEdit text always selected when page becomes Active Pin
Bryan Anslow14-Sep-01 9:41
Bryan Anslow14-Sep-01 9:41 
QuestionHow can I do create a dll? Pin
14-Sep-01 6:08
suss14-Sep-01 6:08 
AnswerRe: How can I do create a dll? Pin
Nemanja Trifunovic14-Sep-01 6:26
Nemanja Trifunovic14-Sep-01 6:26 
GeneralVisual C Wizards Pin
14-Sep-01 5:58
suss14-Sep-01 5:58 
GeneralRe: Visual C Wizards Pin
RobJones14-Sep-01 6:36
RobJones14-Sep-01 6:36 
GeneralReadProcessMemory (or "What's wrong with my code?") Pin
Steve The Plant14-Sep-01 5:43
Steve The Plant14-Sep-01 5:43 
I'm trying to write a debugger for another program
I've written, but I'm having trouble getting OutputDebugString
messages from it. While it seems to me I'm doing everything ok,
I get garbage as the string, even though the event correctly
reports the size of the string.

DEBUG_EVENT oDebugEvent;
if (WaitForDebugEvent(&oDebugEvent, INFINITE))
{
if (oDebugEvent.dwDebugEventCode == OUTPUT_DEBUG_STRING_EVENT)
{
char strTempString[1000] = "";

if (!ReadProcessMemory((HANDLE)dwProcessHandle,
oDebugEvent.u.DebugString.lpDebugStringData,
strTempString,
oDebugEvent.u.DebugString.nDebugStringLength,
NULL))
{
printf("ReadProcessMemory() FAILED\n");
printf("ERROR NUMER: %d", GetLastError());
}
else
{
printf("%s\n", strTempString);
}
}
ContinueDebugEvent(oDebugEvent.dwProcessId,
oDebugEvent.dwThreadId,
DBG_CONTINUE);
}

The only thing I wonder about is the oDebugEvent.u.DebugString.lpDebugStringData I'm passing to
ReadProcessMemory(). In MSDN, ReadProcessMemory() needs a
"Pointer to the base address in the specified process from
which to read." Does this mean I'm not passing the right value
to it? If not, then what?

Steve The Plant

ps: as a side note, I've tried to indent the code, but it just
shows up as a chunk. Anyway to fix that?
GeneralRe: ReadProcessMemory (or "What's wrong with my code?") Pin
Paolo Messina15-Sep-01 13:51
professionalPaolo Messina15-Sep-01 13:51 
QuestionHas somebody written a standalone splitter class? Pin
Tommy H D Svensson14-Sep-01 4:42
Tommy H D Svensson14-Sep-01 4:42 
AnswerRe: Has somebody written a standalone splitter class? Pin
Remi Morin14-Sep-01 9:07
Remi Morin14-Sep-01 9:07 
GeneralRe: Has somebody written a standalone splitter class? Pin
Tommy H D Svensson16-Sep-01 21:51
Tommy H D Svensson16-Sep-01 21:51 
GeneralRegistering dll within setup.exe Pin
byblostas14-Sep-01 3:05
byblostas14-Sep-01 3:05 
GeneralRe: Registering dll within setup.exe Pin
Carlos Antollini14-Sep-01 3:47
Carlos Antollini14-Sep-01 3:47 
GeneralToolbar Problems Pin
James Bird14-Sep-01 2:05
James Bird14-Sep-01 2:05 
GeneralRe: Toolbar Problems Pin
Tomasz Sowinski14-Sep-01 2:19
Tomasz Sowinski14-Sep-01 2:19 
QuestionSDI and variables - where should I place them? Pin
14-Sep-01 1:57
suss14-Sep-01 1:57 
AnswerRe: SDI and variables - where should I place them? Pin
Steen Krogsgaard14-Sep-01 2:15
Steen Krogsgaard14-Sep-01 2:15 
GeneralRe: SDI and variables - where should I place them? Pin
14-Sep-01 4:56
suss14-Sep-01 4:56 
GeneralRe: SDI and variables - where should I place them? Pin
14-Sep-01 10:12
suss14-Sep-01 10:12 
AnswerRe: Use your class derived from CObject! Pin
Masaaki Onishi14-Sep-01 7:34
Masaaki Onishi14-Sep-01 7:34 
AnswerYep - got it to work! Thanks guys! Pin
18-Sep-01 8:56
suss18-Sep-01 8:56 
QuestionHow to get the text of edit ctrl from first dialog box in second dialog box? Pin
my match14-Sep-01 1:51
my match14-Sep-01 1:51 
AnswerRe: How to get the text of edit ctrl from first dialog box in second dialog box? Pin
Steen Krogsgaard14-Sep-01 2:10
Steen Krogsgaard14-Sep-01 2:10 
QuestionSQL Server Experts - Could you provide some insight ? Pin
ManaInfy14-Sep-01 1:17
ManaInfy14-Sep-01 1:17 

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.