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

C / C++ / MFC

 
GeneralRe: [OT] Re: SHBrowseForFolder - start up dir Pin
YaronNir8-May-06 5:40
YaronNir8-May-06 5:40 
GeneralRe: [OT] Re: SHBrowseForFolder - start up dir Pin
David Crow8-May-06 9:08
David Crow8-May-06 9:08 
GeneralRe: SHBrowseForFolder - start up dir Pin
YaronNir8-May-06 5:06
YaronNir8-May-06 5:06 
QuestionRe: SHBrowseForFolder - start up dir Pin
David Crow8-May-06 5:33
David Crow8-May-06 5:33 
AnswerRe: SHBrowseForFolder - start up dir Pin
YaronNir8-May-06 5:51
YaronNir8-May-06 5:51 
AnswerRe: SHBrowseForFolder - start up dir Pin
jhwurmbach8-May-06 4:42
jhwurmbach8-May-06 4:42 
GeneralRe: SHBrowseForFolder - start up dir Pin
YaronNir8-May-06 4:44
YaronNir8-May-06 4:44 
QuestionDLL-problem: memory leaks Pin
hoelrich8-May-06 4:22
hoelrich8-May-06 4:22 
Hallo Smile | :) ,

I have the following problem: in a simple windows application "DynamicLoad.exe" a dll "DefExported.dll" is loaded. If I quit
the dll in InitInstance() with return FALSE instead of return TRUE,
I get memory leaks in the debugger at the end. Is it possible to change this?


Detected memory leaks!
Dumping objects ->
{96} client block at 0x0035A150, subtype c0, 64 bytes long.
a CDynLinkLibrary object at $0035A150, 64 bytes long
Object dump complete.
The program '[444] DynamicLoad.exe: Native' has exited with code 2 (0x2).

(Remark: FreeLibrary( hClcltr ) does not change anything, because return False results in 0 for HINSTANCE hClcltr=LoadLibrary("DefExported.dll").)

The problem is independent of the Microsoft Visual Studio Version (e.g. 6,7,8). The code to try out this, you can look at the page of "DLLs
are Simple! Part 3 By Mahmood Komeily" on this forum.

Just add in DefExported.cpp:

BOOL CDefExportedApp::InitInstance()
{
CWinApp::InitInstance();
return FALSE;
//return TRUE;
}

And in DefExported.h:

class CDefExportedApp : public CWinApp
{
public:
int Multiply(int ParOne,int ParTwo);
CDefExportedApp();

virtual BOOL InitInstance();

...
}

Smile | :)
AnswerRe: DLL-problem: memory leaks Pin
Laxman Auti8-May-06 4:33
Laxman Auti8-May-06 4:33 
GeneralRe: DLL-problem: memory leaks Pin
hoelrich8-May-06 6:19
hoelrich8-May-06 6:19 
QuestionUsing unmanaged MFC classes from C# Pin
Kurt _B8-May-06 4:03
Kurt _B8-May-06 4:03 
AnswerRe: Using unmanaged MFC classes from C# Pin
Chris Losinger8-May-06 4:08
professionalChris Losinger8-May-06 4:08 
GeneralRe: Using unmanaged MFC classes from C# Pin
Kurt _B8-May-06 4:14
Kurt _B8-May-06 4:14 
QuestionInfo about Installing Delegate Pin
Girish6018-May-06 3:42
Girish6018-May-06 3:42 
QuestionC++ chat program, How to start? Pin
moloza8-May-06 3:27
moloza8-May-06 3:27 
AnswerRe: C++ chat program, How to start? Pin
David Crow8-May-06 3:35
David Crow8-May-06 3:35 
GeneralRe: C++ chat program, How to start? Pin
Eytukan8-May-06 3:42
Eytukan8-May-06 3:42 
GeneralRe: C++ chat program, How to start? Pin
led mike8-May-06 6:28
led mike8-May-06 6:28 
Questionconnecting two same-model webcams in win XP Pin
V_shr8-May-06 3:22
V_shr8-May-06 3:22 
AnswerRe: connecting two same-model webcams in win XP Pin
kakan8-May-06 3:34
professionalkakan8-May-06 3:34 
GeneralRe: connecting two same-model webcams in win XP Pin
V_shr8-May-06 3:58
V_shr8-May-06 3:58 
GeneralPlease help me Pin
V_shr8-May-06 4:18
V_shr8-May-06 4:18 
QuestionC Structure and Function Pin
Try8-May-06 3:12
Try8-May-06 3:12 
AnswerRe: C Structure and Function Pin
Chris Losinger8-May-06 3:19
professionalChris Losinger8-May-06 3:19 
AnswerRe: C Structure and Function Pin
jhwurmbach8-May-06 3:23
jhwurmbach8-May-06 3:23 

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.