Click here to Skip to main content
16,016,425 members
Home / Discussions / COM
   

COM

 
GeneralATL that importing DLL Pin
mimi17-Oct-01 0:58
mimi17-Oct-01 0:58 
GeneralRe: ATL that importing DLL Pin
kumar_p317-Oct-01 16:55
kumar_p317-Oct-01 16:55 
GeneralThank you . more details. Please Help Pin
mimi17-Oct-01 22:45
mimi17-Oct-01 22:45 
GeneralRe: ATL that importing DLL Pin
mimi17-Oct-01 23:52
mimi17-Oct-01 23:52 
GeneralMaking things pretty by returning BSTR's (ATLCOM) Pin
Tim Rymer16-Oct-01 10:00
Tim Rymer16-Oct-01 10:00 
GeneralRe: Making things pretty by returning BSTR's (ATLCOM) Pin
Not Active16-Oct-01 11:17
mentorNot Active16-Oct-01 11:17 
GeneralRe: Making things pretty by returning BSTR's (ATLCOM) Pin
Shadi Al-Kahwaji16-Oct-01 22:00
Shadi Al-Kahwaji16-Oct-01 22:00 
GeneralRe: Making things pretty by returning BSTR's (ATLCOM) Pin
Michael P Butler16-Oct-01 22:36
Michael P Butler16-Oct-01 22:36 
>..and have it returned in a variable in the Implementation. (duh)
>But can we get this a function in an object to look like:

>///////////////
>BSTR Foo(BSTR instring);
>///////////////

No, COM interfaces can't return a value like you suggest.

The correct (and only way) is as you described,

STDMETHODIMP Foo([out,retval] BSTR* outstring)


Your VB code would then look like,

Dim sTemp

sTemp = Object.Foo


Hope this helps,

Michael Smile | :)
GeneralRe: Making things pretty by returning BSTR's (ATLCOM) Pin
22-Oct-01 13:08
suss22-Oct-01 13:08 
GeneralRe: Making things pretty by returning BSTR's (ATLCOM) Pin
Bill Wilson22-Oct-01 14:10
Bill Wilson22-Oct-01 14:10 
GeneralInconsistent registration Pin
Jamie Hale16-Oct-01 8:49
Jamie Hale16-Oct-01 8:49 
GeneralRe: Inconsistent registration Pin
Jamie Hale16-Oct-01 9:13
Jamie Hale16-Oct-01 9:13 
GeneralRe: Inconsistent registration Pin
Nemanja Trifunovic16-Oct-01 9:24
Nemanja Trifunovic16-Oct-01 9:24 
GeneralRe: Inconsistent registration Pin
Jamie Hale16-Oct-01 9:30
Jamie Hale16-Oct-01 9:30 
GeneralRe: Inconsistent registration Pin
Jamie Hale16-Oct-01 9:32
Jamie Hale16-Oct-01 9:32 
GeneralRe: Inconsistent registration Pin
Shadi Al-Kahwaji16-Oct-01 21:51
Shadi Al-Kahwaji16-Oct-01 21:51 
GeneralNamespace extension - cut-and-paste feedback Pin
reverendshoebox16-Oct-01 2:52
reverendshoebox16-Oct-01 2:52 
GeneralPowerpoint developer question...... Pin
Huu Quynh15-Oct-01 6:13
Huu Quynh15-Oct-01 6:13 
GeneralRe: Powerpoint developer question...... Pin
Carlos Antollini15-Oct-01 6:48
Carlos Antollini15-Oct-01 6:48 
GeneralDisplaying custom IE error pages Pin
Amit Dey13-Oct-01 6:16
Amit Dey13-Oct-01 6:16 
GeneralCLSID's Pin
#realJSOP13-Oct-01 4:41
professional#realJSOP13-Oct-01 4:41 
GeneralRe: CLSID's Pin
13-Oct-01 14:14
suss13-Oct-01 14:14 
GeneralRe: CLSID's Pin
#realJSOP13-Oct-01 14:35
professional#realJSOP13-Oct-01 14:35 
GeneralRe: CLSID's Pin
#realJSOP13-Oct-01 14:56
professional#realJSOP13-Oct-01 14:56 
GeneralRe: CLSID's Pin
#realJSOP13-Oct-01 15:42
professional#realJSOP13-Oct-01 15:42 

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.