Click here to Skip to main content
15,925,181 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: List View Pin
Nish Nishant21-Jul-02 15:44
sitebuilderNish Nishant21-Jul-02 15:44 
GeneralRe: List View Pin
Chris Losinger21-Jul-02 17:32
professionalChris Losinger21-Jul-02 17:32 
Generaldisabling menus Pin
SilentWarrior21-Jul-02 7:32
SilentWarrior21-Jul-02 7:32 
GeneralRe: disabling menus Pin
Brian Delahunty21-Jul-02 9:17
Brian Delahunty21-Jul-02 9:17 
GeneralRe: disabling menus Pin
Brian Delahunty21-Jul-02 9:22
Brian Delahunty21-Jul-02 9:22 
Generalpassing COM into another COM Pin
Anonymous21-Jul-02 6:57
Anonymous21-Jul-02 6:57 
GeneralRe: passing COM into another COM Pin
Dudi Avramov22-Jul-02 1:23
Dudi Avramov22-Jul-02 1:23 
Generalsimplest syntax, u must know, welcome! Pin
includeh1021-Jul-02 5:43
includeh1021-Jul-02 5:43 
normally, c++ calling is syncronized, here is an example:

//caller
int i;
GetInt(i);

//function
void GetInt(int&i)
{
............
i=5;
//point a
more code here
}//point b, end function

my question is, the caller gets value i=5 at point a or point b?

this question sounds silly and no interesting, but from first day of using COM to now, i don't undestand why following code works fine (thousands of times with no any trouble), see code bellow:

//COM code
void GetBSTR(BSTR*ppw)
{
BSTR str=::SysAllocString("my string in word");
*ppw=str;
//point a
::SysFreeString(str);
}//point b

the 'str' has been freed at point b, why caller has no trouble?
i know many people don't use ::SysFreeString, but anyway we should, otherwise who frees 'str'?

thx









includeh10
GeneralRe: simplest syntax, u must know, welcome! Pin
loket21-Jul-02 7:05
loket21-Jul-02 7:05 
GeneralRe: simplest syntax, u must know, welcome! Pin
Michael Dunn21-Jul-02 7:50
sitebuilderMichael Dunn21-Jul-02 7:50 
GeneralRe: simplest syntax, u must know, welcome! Pin
benjymous22-Jul-02 0:43
benjymous22-Jul-02 0:43 
QuestionHow to select the point? Pin
chen21-Jul-02 5:41
chen21-Jul-02 5:41 
AnswerRe: How to select the point? Pin
567890123421-Jul-02 23:30
567890123421-Jul-02 23:30 
Questiondrag ang drop menu items, is it possible? Pin
includeh1021-Jul-02 4:49
includeh1021-Jul-02 4:49 
Questiondrag and drop pictures from dialog to dialog? Pin
includeh1021-Jul-02 4:41
includeh1021-Jul-02 4:41 
Questionbitmap: how to create from buffer? Pin
includeh1021-Jul-02 4:23
includeh1021-Jul-02 4:23 
AnswerRe: bitmap: how to create from buffer? Pin
Chris Losinger21-Jul-02 7:39
professionalChris Losinger21-Jul-02 7:39 
QuestionIs there any way of printing with or onto a pdf file? Pin
DanYELL21-Jul-02 4:23
DanYELL21-Jul-02 4:23 
GeneralPassing WM_PAINT to dll from EXE Pin
Chris Klecker21-Jul-02 4:14
Chris Klecker21-Jul-02 4:14 
GeneralRe: Passing WM_PAINT to dll from EXE Pin
Paul M Watt22-Jul-02 6:42
mentorPaul M Watt22-Jul-02 6:42 
GeneralPassing String from COM to VB Client Pin
Anonymous21-Jul-02 2:39
Anonymous21-Jul-02 2:39 
GeneralRe: Passing String from COM to VB Client Pin
Dudi Avramov21-Jul-02 3:32
Dudi Avramov21-Jul-02 3:32 
GeneralRe: Passing String from COM to VB Client Pin
Anonymous21-Jul-02 6:58
Anonymous21-Jul-02 6:58 
Generalnot reading the file when executed from start menu Pin
a3gupta21-Jul-02 2:29
a3gupta21-Jul-02 2:29 
QuestionPainting etc - gdi?? Pin
Anonymous21-Jul-02 2:13
Anonymous21-Jul-02 2:13 

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.