HighTechTalks DotNet Forums  

Exposing [vararg] COM method

Dotnet Framework (Interop) microsoft.public.dotnet.framework.interop


Discuss Exposing [vararg] COM method in the Dotnet Framework (Interop) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Ladislav Prosek
 
Posts: n/a

Default Exposing [vararg] COM method - 11-14-2005 , 03:35 AM






Hello,

I would like to expose an analogue of the WScript.Echo method to scripts
hosted in my .NET application. According to MSDN, the method should accept a
variable number of arguments:

Echo [Arg1] [,Arg2] [,Arg3] ...

Unfortunately I had no success so far with declaring this in C#. Aurigma's
COM to .NET says that it should go like this:

void Echo ([MarshalAs(UnmanagedType.SafeArray, SafeArraySubType =
VarEnum.VT_VARIANT)] object[] pArgs);

However, it does not work. I guess I have to somehow declare that the method
is 'vararg'. Any ideas?

Thanks,
LP

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.