|
this is the error I'm getting in the debug info in my dll:
HEAP[Project1.exe]: Invalid Address specified to RtlFreeHeap( 1150000, 12046d0 )
If it's broken, I probably did it
bdiamond
|
|
|
|
|
Pretty much as I suspected, then.
There are a few causes of this:
o This could be freeing memory twice (more common than you'd expect!)
o Using malloc/new, then altering the pointer before calling free/delete.
o Block overrun (writing past the allocated buffer)
o Accessing memory after freeing it
Also, you might want to read PSS 190799 in the MSDN KB for what you can't pass around via DLLs.
Can you do a debug build of your DLL, and run VB via the debugger or use DBMON/DebugView to see the debug output? It might provide more information...
Steve S
|
|
|
|
|
Hi all,
I am using AddItem() to add tabs to a CTabCtrl but don't know how to actually add content to each tab. Can I just design dialogs or PropPages from the resources and load them into a tab?
Mark
|
|
|
|
|
|
How do I use rand() with a button to display the random number in an edit box. I know its a simple question but I'm new to C++. please help.
|
|
|
|
|
Hi,
it is very easy. Have you discovered MSDN?
Sincerely Yours,
RadioShark
|
|
|
|
|
thank rdioshark I'll have a look. microsoft developers network right? will it help a newbie like me?
nicolas
|
|
|
|
|
nicolas thompson wrote:
will it help a newbie like me?
A tool is what you make of it. Whether it helps you or not can only be determined by you. Others can offer their perspective but the deciding factor is solely yours. Enjoy!
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Are you wanting help with the button-click event, or the updating of an edit box?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
The button-click event.
Thanks very much in advance David.
nicolas
|
|
|
|
|
Handle the BN_CLICKED message. If you are using MFC, use ClassWizard (Ctrl+W) to create a ON_BN_CLICKED() handler.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I'using Borland C++ builder 4.0. I've got a button which Ive called btnGenerate an edit box called editA. I want to generate a number in the edit box between 0-9 on the click event of the generate button. Are you familiar with the borland C++ builder. I'm not sure I've heard of the MFC.
Many thanks nicolas.
|
|
|
|
|
Anonymous wrote:
Are you familiar with the borland C++ builder.
I've not used a Borland product in over a decade. Sorry.
Anonymous wrote:
I'm not sure I've heard of the MFC.
It's part of Microsoft Visual C++, the main topic of this board.
Anonymous wrote:
I want to generate a number ... between 0-9
When you are ready for it, here's the code:
int x = rand() % 10;
|
|
|
|
|
I'using Borland C++ builder 4.0. I've got a button which Ive called btnGenerate an edit box called editA. I want to generate a number in the edit box between 0-9 on the click event of the generate button. Are you familiar with the borland C++ builder. I'm not sure I've heard of the MFC.
Many thanks nicolas.
|
|
|
|
|
Hi all,
I have created a DLL from some C++ code (to call from my C# app).
The DLL creates and writes to a couple of files.
However, it writes them to the folder last used by the C# app.
1. Why? (Less important)
2. How do I specify where to write the file, relative to the DLL file. (More Important)
Thanks in advance for any suggestions/hints.
J
---
|
|
|
|
|
Hi,
Do you use GetModuleFileName() or GetModuleFileNameEx()?
Sincerely Yours,
RadioShark
|
|
|
|
|
No, but I am not experienced in C++.
They sound like what I need - so what's the difference.
J
---
|
|
|
|
|
RadioShark wrote:
Do you use GetModuleFileName() or GetModuleFileNameEx()?
It appears that neither of these are recognised by the compiler - do I need to include them somehow?
---
|
|
|
|
|
If you are receiving a compiler error, make sure that windows.h is included.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Thanks anyway - have solved it another way (in the C#).
J
---
|
|
|
|
|
Care to share?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
sure -
I just set the working directory before calling the DLL.
Environment.CurrentDirectory = Path.Combine(Application.StartupPath, "Working\\");
where /working/ is the directory I want to create the output files in.
The working directory is set by other functions also.
J
---
|
|
|
|
|
This post indicated you were getting compiler errors. I don't see the relationship between not having GetModuleFileName() or GetModuleFileNameEx() recognized by the compiler, and setting the working directory before calling a DLL.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
This post was a solution to my original problem.
---
|
|
|
|
|
Dear All,
I am a new comer of this message board. First let me say hi to you all ^_^
I am working on my project in my school which require me to check if there is any new file exist in a folder by using MFC. Since I am just start learning MFC a few weeks before, I totally have no idea about how I can do so........
Would anyone give me some advice on this in details?
Really thanks a lot!
Yours,
Meteor
|
|
|
|