Click here to Skip to main content
16,013,605 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Destroying Pointers and stuff Pin
HakunaMatada15-Mar-06 19:23
HakunaMatada15-Mar-06 19:23 
GeneralRe: Destroying Pointers and stuff Pin
Nibu babu thomas15-Mar-06 19:25
Nibu babu thomas15-Mar-06 19:25 
GeneralRe: Destroying Pointers and stuff Pin
HakunaMatada15-Mar-06 23:44
HakunaMatada15-Mar-06 23:44 
GeneralRe: Destroying Pointers and stuff Pin
Nibu babu thomas15-Mar-06 23:51
Nibu babu thomas15-Mar-06 23:51 
GeneralRe: Destroying Pointers and stuff Pin
HakunaMatada16-Mar-06 0:07
HakunaMatada16-Mar-06 0:07 
GeneralRe: Destroying Pointers and stuff Pin
Nibu babu thomas16-Mar-06 0:11
Nibu babu thomas16-Mar-06 0:11 
GeneralRe: Destroying Pointers and stuff Pin
HakunaMatada16-Mar-06 17:01
HakunaMatada16-Mar-06 17:01 
GeneralRe: Destroying Pointers and stuff Pin
Nibu babu thomas16-Mar-06 17:27
Nibu babu thomas16-Mar-06 17:27 
Save My Soul - (SMS) wrote:
The first argument gives a value and the second argument returns a Long IDispatch Pointer. So for this implementation, where should the Addref for lptmp1 and lptmp2 occur. Should it be inside this function like

bool hello( LPDISPATCH lptmp1, LPDISPATCH &lptmp2 )
{
lptmp1->AddRef() ;
lptmp2->AddRef() ;
}


Good question....

For lptmp1 it could be inside hello because the use of lptmp1 finishes here in hello and for lptmp2 it could be outside hello because it continues to exist beyond hello. Because I believe AddRef and Release should take place in the same scope.


Nibu thomas
Software Developer

GeneralRe: Destroying Pointers and stuff Pin
HakunaMatada16-Mar-06 19:01
HakunaMatada16-Mar-06 19:01 
GeneralRe: Destroying Pointers and stuff Pin
Nibu babu thomas16-Mar-06 19:06
Nibu babu thomas16-Mar-06 19:06 
GeneralRe: Destroying Pointers and stuff Pin
Stephen Hewitt15-Mar-06 19:29
Stephen Hewitt15-Mar-06 19:29 
GeneralRe: Destroying Pointers and stuff Pin
HakunaMatada15-Mar-06 23:45
HakunaMatada15-Mar-06 23:45 
GeneralRe: Destroying Pointers and stuff Pin
Stephen Hewitt16-Mar-06 11:46
Stephen Hewitt16-Mar-06 11:46 
QuestionCall back Function Pin
vivek.s.vivek15-Mar-06 18:38
vivek.s.vivek15-Mar-06 18:38 
AnswerRe: Call back Function Pin
Nibu babu thomas15-Mar-06 18:52
Nibu babu thomas15-Mar-06 18:52 
Questionstring s1 = "abcd"; string s2 = "2.53", how to detect that s2 representing a numeber? Pin
mrby12315-Mar-06 18:01
mrby12315-Mar-06 18:01 
AnswerRe: string s1 = "abcd"; string s2 = "2.53", how to detect that s2 representing a numeber? Pin
Hamid_RT15-Mar-06 18:12
Hamid_RT15-Mar-06 18:12 
GeneralRe: string s1 = "abcd"; string s2 = "2.53", how to detect that s2 representing a numeber? Pin
mrby12315-Mar-06 18:15
mrby12315-Mar-06 18:15 
GeneralRe: string s1 = "abcd"; string s2 = "2.53", how to detect that s2 representing a numeber? Pin
Hamid_RT15-Mar-06 18:17
Hamid_RT15-Mar-06 18:17 
GeneralRe: string s1 = "abcd"; string s2 = "2.53", how to detect that s2 representing a numeber? Pin
mrby12315-Mar-06 18:29
mrby12315-Mar-06 18:29 
AnswerRe: string s1 = "abcd"; string s2 = "2.53", how to detect that s2 representing a numeber? Pin
Johann Gerell15-Mar-06 20:02
Johann Gerell15-Mar-06 20:02 
GeneralRe: string s1 = "abcd"; string s2 = "2.53", how to detect that s2 representing a numeber? Pin
Nemanja Trifunovic16-Mar-06 2:13
Nemanja Trifunovic16-Mar-06 2:13 
GeneralRe: string s1 = "abcd"; string s2 = "2.53", how to detect that s2 representing a numeber? Pin
Johann Gerell16-Mar-06 2:38
Johann Gerell16-Mar-06 2:38 
GeneralRe: string s1 = "abcd"; string s2 = "2.53", how to detect that s2 representing a numeber? Pin
Nemanja Trifunovic16-Mar-06 3:08
Nemanja Trifunovic16-Mar-06 3:08 
AnswerRe: string s1 = "abcd"; string s2 = "2.53", how to detect that s2 representing a numeber? Pin
normanS15-Mar-06 18:13
normanS15-Mar-06 18: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.