Click here to Skip to main content
16,005,096 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralWTL based D3D Pin
iNhuman14-Feb-04 23:12
iNhuman14-Feb-04 23:12 
Generalhelp me Pin
don7cry13-Feb-04 17:03
don7cry13-Feb-04 17:03 
Generalvector - interfacing to C api Pin
jcplatt13-Feb-04 10:28
jcplatt13-Feb-04 10:28 
GeneralRe: vector - interfacing to C api Pin
Michael Dunn13-Feb-04 17:17
sitebuilderMichael Dunn13-Feb-04 17:17 
QuestionHow to free the memory? Pin
freehawk12-Feb-04 15:53
freehawk12-Feb-04 15:53 
AnswerRe: How to free the memory? Pin
Tim Smith12-Feb-04 16:10
Tim Smith12-Feb-04 16:10 
GeneralRe: How to free the memory? Pin
freehawk12-Feb-04 18:21
freehawk12-Feb-04 18:21 
AnswerRe: How to free the memory? Pin
Michael Dunn12-Feb-04 20:22
sitebuilderMichael Dunn12-Feb-04 20:22 
Well, you're trashing your stack due to the new[] bug that's been pointed out.
After you fix that, the problem becomes one of where is the memory being allocated? Unless you can be sure that both modules are using the same heap, you can't alloc in one module and free in the other. Because MFC has its own spiffy memory management, it probably has its own heap(s).
The way I usually do it is to alloc with CoTaskMemAlloc() and free with CoTaskMemFree(). Those use an allocator that the entire process can access.

[edit]Actually, it's not doing anything to the stack, since the memory is on the heap. It was late when I wrote that Wink | ;) The code does write past the end of an allocated block of memory, though.[/edit]

--Mike--
Personal stuff:: Ericahist Updated Feb 6! | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ

Actual sign at the laundromat I go to: "No tinting or dying."
GeneralRe: How to free the memory? Pin
Tim Smith13-Feb-04 3:50
Tim Smith13-Feb-04 3:50 
AnswerRe: How to free the memory? Pin
socrates-redux27-Feb-04 13:27
socrates-redux27-Feb-04 13:27 
GeneralInteresting COM ATL Event question. Pin
Brigsoft12-Feb-04 8:30
Brigsoft12-Feb-04 8:30 
GeneralRe: Interesting COM ATL Event question. Pin
Jörgen Sigvardsson12-Feb-04 9:22
Jörgen Sigvardsson12-Feb-04 9:22 
GeneralVector of Vector Pin
Bernhard12-Feb-04 0:15
Bernhard12-Feb-04 0:15 
GeneralRe: Vector of Vector Pin
Jörgen Sigvardsson12-Feb-04 10:18
Jörgen Sigvardsson12-Feb-04 10:18 
Questionhow to change view in a sdi frame window Pin
fftz11-Feb-04 22:19
fftz11-Feb-04 22:19 
AnswerRe: how to change view in a sdi frame window Pin
TFrancis12-Feb-04 5:27
TFrancis12-Feb-04 5:27 
AnswerRe: how to change view in a sdi frame window Pin
Michael Dunn12-Feb-04 20:17
sitebuilderMichael Dunn12-Feb-04 20:17 
QuestionHow to add ATL object map in simple Win32 Application Pin
SiddharthAtw11-Feb-04 19:45
SiddharthAtw11-Feb-04 19:45 
AnswerRe: How to add ATL object map in simple Win32 Application Pin
Steve S11-Feb-04 22:11
Steve S11-Feb-04 22:11 
GeneralRe: How to add ATL object map in simple Win32 Application Pin
SiddharthAtw11-Feb-04 23:26
SiddharthAtw11-Feb-04 23:26 
GeneralRe: How to add ATL object map in simple Win32 Application Pin
Steve S12-Feb-04 6:04
Steve S12-Feb-04 6:04 
QuestionHow to launch a console simply from a wtl project?(Only launch) Pin
freehawk11-Feb-04 14:11
freehawk11-Feb-04 14:11 
GeneralCTreeViewCtrl Pin
TFrancis11-Feb-04 6:06
TFrancis11-Feb-04 6:06 
GeneralInsert ActiveX wizard trouble Pin
El'Cachubrey10-Feb-04 21:22
El'Cachubrey10-Feb-04 21:22 
GeneralRe: Insert ActiveX wizard trouble Pin
Anonymous11-Feb-04 10:47
Anonymous11-Feb-04 10:47 

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.