Click here to Skip to main content
15,915,093 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: The character we get in a mouse position? Pin
jmkhael3-Jun-04 4:13
jmkhael3-Jun-04 4:13 
GeneralRe: The character we get in a mouse position? Pin
golfbear3-Jun-04 6:10
golfbear3-Jun-04 6:10 
GeneralRe: The character we get in a mouse position? Pin
jmkhael3-Jun-04 6:14
jmkhael3-Jun-04 6:14 
AnswerRe: The character we get in a mouse position? Pin
User 66583-Jun-04 2:56
User 66583-Jun-04 2:56 
GeneralRe: The character we get in a mouse position? Pin
golfbear3-Jun-04 4:01
golfbear3-Jun-04 4:01 
AnswerRe: The character we get in a mouse position? Pin
cmk3-Jun-04 23:34
cmk3-Jun-04 23:34 
GeneralSetForegroundWindow() to a Message-Window prevents a later popped parentless-modal-dialog from showing Pin
ohadp3-Jun-04 1:46
ohadp3-Jun-04 1:46 
GeneralMemory Leak with BSTRs Pin
Jo Fredrickson3-Jun-04 0:57
Jo Fredrickson3-Jun-04 0:57 
I've been using some memory leak detection software to solve my ever growing memory usage problem. The following has turned up, can someone help me understand why my first function call results in a leak, but the second doesn't. Or is this a bogus memory leak detection?

The function is
void Foo(BSTR sInput1, BSTR sInput2)
{
// do nothing with the inputs
}

This call results in a leak...
Foo((bstr_t)_T("Blah"), (bstr_t)_T("Blah"));

but this is OK...
Foo((BSTR)_T("Blah"), (BSTR)_T("Blah"));

If this will solve all my problems I am happy to use the second calling method, but I'm a bit sceptical... Any comments?

PS: I use Unicode and acsii builds

GeneralRe: Memory Leak with BSTRs Pin
Jonas Larsson3-Jun-04 3:21
Jonas Larsson3-Jun-04 3:21 
Generalwith RTC Client Pin
don7cry2-Jun-04 23:47
don7cry2-Jun-04 23:47 
Questionhow can i send data to USB port Pin
Zeeshan Bilal2-Jun-04 23:35
Zeeshan Bilal2-Jun-04 23:35 
AnswerRe: how can i send data to USB port Pin
Trollslayer3-Jun-04 1:49
mentorTrollslayer3-Jun-04 1:49 
AnswerRe: how can i send data to USB port Pin
jmkhael3-Jun-04 1:52
jmkhael3-Jun-04 1:52 
GeneralTelnet Pin
Anonymous2-Jun-04 23:29
Anonymous2-Jun-04 23:29 
GeneralRe: Telnet Pin
parths3-Jun-04 20:45
parths3-Jun-04 20:45 
QuestionHow to show video on TV? Pin
Alex_ManOwaR2-Jun-04 23:24
Alex_ManOwaR2-Jun-04 23:24 
GeneralServices icon problem Pin
JensB2-Jun-04 22:55
JensB2-Jun-04 22:55 
GeneralRe: Services icon problem Pin
Iain Clarke, Warrior Programmer3-Jun-04 4:30
Iain Clarke, Warrior Programmer3-Jun-04 4:30 
GeneralRe: Services icon problem Pin
Anonymous5-Jun-04 21:37
Anonymous5-Jun-04 21:37 
GeneralMFC App to DLL Query Pin
sweep1232-Jun-04 22:09
sweep1232-Jun-04 22:09 
GeneralRe: MFC App to DLL Query Pin
John R. Shaw2-Jun-04 22:24
John R. Shaw2-Jun-04 22:24 
GeneralRe: MFC App to DLL Query Pin
sweep1232-Jun-04 22:35
sweep1232-Jun-04 22:35 
GeneralRe: MFC App to DLL Query Pin
John R. Shaw2-Jun-04 23:43
John R. Shaw2-Jun-04 23:43 
GeneralRe: MFC App to DLL Query Pin
sweep1233-Jun-04 0:30
sweep1233-Jun-04 0:30 
GeneralRe: MFC App to DLL Query Pin
John R. Shaw3-Jun-04 1:35
John R. Shaw3-Jun-04 1:35 

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.