Re: How to return VB "Nothing"
From: Alexander Nickolov (agnickolov_at_mvps.org)
Date: 12/10/04
- Next message: thatsalok: "Re: How to create Runtime DLL."
- Previous message: Alexander Nickolov: "Re: ATLTRACE(atlTraceWindowing, 0, _T("ERROR - Object deleted before window was destroyed\n"));"
- In reply to: Andrew Jarvis: "Re: How to return VB "Nothing""
- Next in thread: German: "Re: How to return VB "Nothing""
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 10 Dec 2004 12:45:56 -0800
That last advice is wrong. The fact that the garbage in the
passed in [out, retval] pointer is typically NULL does not
mean the component should not set it. If for example I am
the client, not VB, it may be true garbage, not NULL!
Failure to set the output argument on success can spell
a crash.
-- ===================================== Alexander Nickolov Microsoft MVP [VC], MCSD email: agnickolov@mvps.org MVP VC FAQ: http://www.mvps.org/vcfaq ===================================== "Andrew Jarvis" <someone@somewhere> wrote in message news:uzKOphr3EHA.3908@TK2MSFTNGP12.phx.gbl... > Nothing is the VB terminology for NULL. > > Just return NULL. > > If fact the pointer that VB will have created to receive the return value > will already be Nothing so you don't have to do anything. > > AJ > > "German" <german.koninin@crmDASHworldwideDOTnet> wrote in message > news:uMlWUUr3EHA.2788@TK2MSFTNGP15.phx.gbl... >> Hi. >> >> I would like to return VB "Nothing" from my method of ATL ActiveX. >> the return type of my method is LPDISPATCH. I have no idea how to do such >> thing. >> In VB it should looks like following. >> >> If myactivex.mymethod is Nothing Then >> BsgBox"Ok" >> End If >> >> Thanks a lot. >> >> > >
- Next message: thatsalok: "Re: How to create Runtime DLL."
- Previous message: Alexander Nickolov: "Re: ATLTRACE(atlTraceWindowing, 0, _T("ERROR - Object deleted before window was destroyed\n"));"
- In reply to: Andrew Jarvis: "Re: How to return VB "Nothing""
- Next in thread: German: "Re: How to return VB "Nothing""
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|