Click here to Skip to main content
15,793,452 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: The character we get in a mouse position? Pin
jmkhael3-Jun-04 5:13
jmkhael3-Jun-04 5:13 
GeneralRe: The character we get in a mouse position? Pin
golfbear3-Jun-04 7:10
golfbear3-Jun-04 7:10 
GeneralRe: The character we get in a mouse position? Pin
jmkhael3-Jun-04 7:14
jmkhael3-Jun-04 7:14 
AnswerRe: The character we get in a mouse position? Pin
User 66583-Jun-04 3:56
User 66583-Jun-04 3:56 
GeneralRe: The character we get in a mouse position? Pin
golfbear3-Jun-04 5:01
golfbear3-Jun-04 5:01 
AnswerRe: The character we get in a mouse position? Pin
cmk4-Jun-04 0:34
cmk4-Jun-04 0:34 
GeneralSetForegroundWindow() to a Message-Window prevents a later popped parentless-modal-dialog from showing Pin
ohadp3-Jun-04 2:46
ohadp3-Jun-04 2:46 
GeneralMemory Leak with BSTRs Pin
Jo Fredrickson3-Jun-04 1:57
Jo Fredrickson3-Jun-04 1: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 4:21
Jonas Larsson3-Jun-04 4:21 
Generalwith RTC Client Pin
don7cry3-Jun-04 0:47
don7cry3-Jun-04 0:47 
Questionhow can i send data to USB port Pin
Zeeshan Bilal3-Jun-04 0:35
Zeeshan Bilal3-Jun-04 0:35 
AnswerRe: how can i send data to USB port Pin
Trollslayer3-Jun-04 2:49
mentorTrollslayer3-Jun-04 2:49 
AnswerRe: how can i send data to USB port Pin
jmkhael3-Jun-04 2:52
jmkhael3-Jun-04 2:52 
GeneralTelnet Pin
Anonymous3-Jun-04 0:29
Anonymous3-Jun-04 0:29 
GeneralRe: Telnet Pin
parths3-Jun-04 21:45
parths3-Jun-04 21:45 
QuestionHow to show video on TV? Pin
Alex_ManOwaR3-Jun-04 0:24
Alex_ManOwaR3-Jun-04 0:24 
GeneralServices icon problem Pin
JensB2-Jun-04 23:55
JensB2-Jun-04 23:55 
GeneralRe: Services icon problem Pin
Iain Clarke, Warrior Programmer3-Jun-04 5:30
Iain Clarke, Warrior Programmer3-Jun-04 5:30 
GeneralRe: Services icon problem Pin
Anonymous5-Jun-04 22:37
Anonymous5-Jun-04 22:37 
GeneralMFC App to DLL Query Pin
sweep1232-Jun-04 23:09
sweep1232-Jun-04 23:09 
GeneralRe: MFC App to DLL Query Pin
John R. Shaw2-Jun-04 23:24
John R. Shaw2-Jun-04 23:24 
GeneralRe: MFC App to DLL Query Pin
sweep1232-Jun-04 23:35
sweep1232-Jun-04 23:35 
GeneralRe: MFC App to DLL Query Pin
John R. Shaw3-Jun-04 0:43
John R. Shaw3-Jun-04 0:43 
GeneralRe: MFC App to DLL Query Pin
sweep1233-Jun-04 1:30
sweep1233-Jun-04 1:30 
GeneralRe: MFC App to DLL Query Pin
John R. Shaw3-Jun-04 2:35
John R. Shaw3-Jun-04 2: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.