Click here to Skip to main content
15,919,341 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCxImage,gif animation Pin
Csaba Csata10-Nov-05 5:10
Csaba Csata10-Nov-05 5:10 
QuestionUsing database and recordsets with multiple .mdb files. Pin
Mark F.10-Nov-05 4:50
Mark F.10-Nov-05 4:50 
AnswerRe: Using database and recordsets with multiple .mdb files. Pin
hairy_hats10-Nov-05 5:33
hairy_hats10-Nov-05 5:33 
GeneralRe: Using database and recordsets with multiple .mdb files. Pin
Mark F.10-Nov-05 6:14
Mark F.10-Nov-05 6:14 
AnswerRe: Using database and recordsets with multiple .mdb files. Pin
David Crow10-Nov-05 8:54
David Crow10-Nov-05 8:54 
GeneralRe: Using database and recordsets with multiple .mdb files. Pin
Mark F.11-Nov-05 10:15
Mark F.11-Nov-05 10:15 
QuestionDirectX - How to Create Virtual Video Capture Source using the Filter Pin
Vishal Jariwala10-Nov-05 4:15
Vishal Jariwala10-Nov-05 4:15 
QuestionWeird memory issue Pin
Axonn Echysttas10-Nov-05 4:00
Axonn Echysttas10-Nov-05 4:00 
Hi everybody. I stumbled today on a rather intriguing issue. I got a DLL which is loaded via a hook in Explorer.exe. In that DLL I got the following HFONT array.

#pragma bss_seg("Share")<br />
<br />
HFONT *hfntarrLabels;<br />
<br />
#pragma bss_seg()


I need it in a #pragma 'cause I use another application to set its elements. Anyway... the problem is that when I try to clean it up, free the memory, explorer.exe crashes. This is how I create it, before hooking:

hfntarrLabels = new HFONT[10];<br />
hfntarrLabels[0] = CreateFont(...)


And this is how I free it, during the hooking:

delete []hfntarrLabels; // <-- crashes

And this, also crashes:

SelectObject(hdcMem, hfntarrLabels[0]);

Even though as far as I can see, the hfntarrLabels[0] has a non zero value.

Ideas anybody?

-= E C H Y S T T A S =-
The Greater Mind Balance
AnswerRe: Weird memory issue Pin
S. Senthil Kumar10-Nov-05 4:55
S. Senthil Kumar10-Nov-05 4:55 
GeneralRe: Weird memory issue Pin
Axonn Echysttas10-Nov-05 6:24
Axonn Echysttas10-Nov-05 6:24 
GeneralRe: Weird memory issue Pin
S. Senthil Kumar10-Nov-05 19:02
S. Senthil Kumar10-Nov-05 19:02 
QuestionHow to remname a VC++ project Pin
TUMB10-Nov-05 3:54
TUMB10-Nov-05 3:54 
AnswerRe: How to remname a VC++ project Pin
Axonn Echysttas10-Nov-05 4:12
Axonn Echysttas10-Nov-05 4:12 
AnswerRe: How to remname a VC++ project Pin
Robin Hilliard10-Nov-05 6:59
Robin Hilliard10-Nov-05 6:59 
Question_vsnprintf questions Pin
ita_cas10-Nov-05 2:35
ita_cas10-Nov-05 2:35 
AnswerRe: _vsnprintf questions Pin
toxcct10-Nov-05 2:46
toxcct10-Nov-05 2:46 
GeneralRe: _vsnprintf questions Pin
kakan10-Nov-05 3:21
professionalkakan10-Nov-05 3:21 
GeneralRe: _vsnprintf questions Pin
toxcct10-Nov-05 3:28
toxcct10-Nov-05 3:28 
Questionsrvice modeRun Project in Service mode Pin
thelip200510-Nov-05 0:48
thelip200510-Nov-05 0:48 
GeneralRe: srvice modeRun Project in Service mode Pin
thelip200510-Nov-05 1:15
thelip200510-Nov-05 1:15 
AnswerRe: srvice modeRun Project in Service mode Pin
kakan10-Nov-05 1:51
professionalkakan10-Nov-05 1:51 
Questionname of the device Pin
viliam10-Nov-05 0:07
viliam10-Nov-05 0:07 
QuestionHow to scroll text ? Pin
Amarelia10-Nov-05 0:02
Amarelia10-Nov-05 0:02 
AnswerRe: How to scroll text ? Pin
toxcct10-Nov-05 0:08
toxcct10-Nov-05 0:08 
AnswerRe: How to scroll text ? Pin
S Douglas10-Nov-05 1:38
professionalS Douglas10-Nov-05 1:38 

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.