|
hm.. this hapens when I try to set a breakpoint
in a cpp file, that belong to a DLL, which is loaded from the main programm..
try this:
_asm int 3;
but now you can only start with debuger attached
on the proccess.
|
|
|
|
|
I dont understand how this helps.
I'm creating a DLL and starting it with an exe. I want to stop and step through from a certain point. How does this help setting and steppin through code?
|
|
|
|
|
as I thought.
just put the
_asm int 3;
in the code, where you want the
debuger to stop. but you MUST start
the programm with a debuger. if not, an exception
is thrown.
the debuger stops at this assembly code.
|
|
|
|
|
What kind of DLL is it? I cannot debug inside a DLL when it is a COM server... if it is an extension DLL, I can do it the normal way.
Try the suggestion of using __asm int 3. The causes the processor to break its execution at that point.
Jaime
|
|
|
|
|
Using __asm int 3 would be useful if i knew assembler.
This all used to work, but now it doesnt. My project is a DLL and the exe that loads it doesnt ahve a symbol table, but this used to work.
Any other suggestions?
|
|
|
|
|
by using __asm int 3 it isn't necessary to know assembler since you will see pure C code if the DLL has been compiled with symbol table.
You told that the EXE that loads the DLL doesn't have a symbol table, so you need to specify it in debug settings of the DLL project.
You always have talked about a DLL, but.. what kind of DLL it is? how have you specified the EXE that loads your DLL?
Jaime
|
|
|
|
|
I have installed Win98/WindowsXP/Windows 2003
How can i retrieve boot drive in MFC
Thanking you
|
|
|
|
|
MFC couldn't care less about the "boot drive." What you want can be obtained by reading the SystemDrive environment variable, or the same-named member of the Win32_OperatingSystem WMI class. You could also call GetWindowsDirectory() and examine the first character of the returned path. Do any of those help?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
GetWindowsDirectory() API return only drive name where windows is installed.
I want to get the information for boot partition.
C:\Windows\ for 98
D:\Windows\ for XP
E:\Windows\ for 2K3
I want to get boot drive (c in winXP programatically.
Thanking you
|
|
|
|
|
But if you boot to, say, Windows XP, wouldn't GetWindowsDirectory() return d:\windows, thus making d: the boot drive?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I am working on a class that manages 2 CStatics , their creation , destruction and text data . here it is :
<br />
<small>class CTestRow {<br />
public :<br />
CTestRow(CString title,CWnd *parent,CRect r){<br />
wndTest = new CStatic;<br />
wndTest->Create(title,WS_CLIPCHILDREN|WS_CHILD|WS_VISIBLE,r,parent);<br />
wndTest->SetFont(font);<br />
<br />
r.left=r.right+10;<br />
r.right=r.left+100;<br />
<br />
wndResult = new CStatic;<br />
wndResult->Create("Untested",WS_CLIPCHILDREN|WS_CHILD|WS_VISIBLE,r,parent);<br />
result="Untested";<br />
};<br />
~CTestRow(){<br />
delete wndTest;<br />
delete wndResult;<br />
}<br />
void SetResultText()<br />
{<br />
wndResult->SetWindowText(result);<br />
<br />
};<br />
<br />
static void DestroyFont<br />
CString result;<br />
<br />
private:<br />
CStatic *wndTest;<br />
CStatic *wndResult;<br />
CString titleTest;<br />
static CFont font;<br />
<br />
<br />
</small>};
Now I am going to to creating an array of CTestRow in my application .
I want all the objects created to reference once instance of CFont . i,e i dont want Cfont to be created again and again for every object.thats why i have declared it static .
But there needs to be a point where I initialize it(CFont object) once and destroy it once when i m done with all objects !
Does C++ have the facility to do this ?
or do i need to have a wrapper class to do that ?
|
|
|
|
|
duh why did i start reading COM ?
use a static int objCount variable and when 0 Create the font
In the destructor check objCount
if 0 then destroy font.
Sorry i m, not thinking today !
|
|
|
|
|
CString strTime=CTime::GetCurrentTime().Format("%m/%d/%Y %H:%M:%S")
How to convert or assign this strTime back to another CTime object ?
|
|
|
|
|
Use COleDateTime instead, then you'll have access to ParseDateTime() , not to mention a wider range of dates.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
COleDateTime has a ParseDateTime member function you could use. If you have to use CTime you could transfer the data from COleDateTime to CTime fairly easily.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
hi everyone,
how can i use mutexes to synchronize
threads of some applications?
thanks if you introduce me refrence about
thread and synchronization.
Best Regard.
|
|
|
|
|
|
Hi everyone,
first:
I use HeapAlloc() to allocate memory on heap.
in vc 6.0 I think HeapAlloc return void*
but in last version of vc i think return LPVOID
and i do not know to use it in array!
for example i declared char* lpBuf and then
lpBuf = HeapAlloc(....);
in .NET i do not know how use it.
second:
how about casting pointer to LPVOID ?
|
|
|
|
|
mostafa_pasha wrote:
in vc 6.0 I think HeapAlloc return void*
but in last version of vc i think return LPVOID
LPVOID is just a typedef for void * .
mostafa_pasha wrote:
and i do not know to use it in array!
Use what in an array?
mostafa_pasha wrote:
for example i declared char* lpBuf and then
lpBuf = HeapAlloc(....);
in .NET i do not know how use it.
How about:
char *lpBuf = (char *) HeapAlloc(...);
lpBuf[0] = 'E';
lpBuf[1] = 'a';
lpBuf[2] = 's';
lpBuf[3] = 'y';
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hello,
Is it possible to capture the output from either ShellExecute or ShellExecuteEx?
I have to run an external program from within my application, and I want to capture the output from that program and put it into a CString variable.
Does anyone know if this is possible, and if so, how?
Thanks,
Murrah Boswell
|
|
|
|
|
You may want to use CreateProcess() instead. See these articles:
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
hey,,,even i want to redirect the output of the shellexecute to a Cstring variable,,,is there no other way,,should i have to use CreateProcess,,Pls help me out,,
Thanks in advance,,
|
|
|
|
|
CWnd *wndow;
wndow=new CWnd();
wndow->Create("","",WS_VISIBLE|WS_CHILD,Rect,this,1234);
I am doing this in a Window (CWnd ) . returns 0 . what am i missing ? Help please
|
|
|
|
|
The class name (first parameter) has to be a valid class name or NULL. It can not be an empty string.
wndow->Create(NULL, ...
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
Hello everybody!
I would appreciate if anybody helps me with such question:
I trying to write a function that "emulates" page opening. I mean, that you send a specific request(that contains specific header information) and the server (I'm talking about HTTP protocol) thinks that information came from a normal browser.
For e.g. you have registred on some server, and webmaster sends you email with the activation link that you need to press, and I want my function send "specific info" to server as if it was really opened in browser.
The question: What exact information message should contain?
|
|
|
|