
Signature
Best regards,
Ruslan Popov
Hi
Here is a sample for your reference.
[ClassInterface(ClassInterfaceType.AutoDual)]
public class TestClass
{
public void
MyMethod([MarshalAs(UnmanagedType.SafeArray,SafeArraySubType=VarEnum.VT_VARI
ANT)]ref System.Array param)
{
;
}
}
Also here is link about Default Marshaling for Arrays in .NET.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconDefaultMarshalingForArrays.asp
Best regards,
Peter Huang
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
Ruslan Popov - 16 Nov 2005 08:31 GMT
Hi Peter,
If you look at the resulting IDL more carefully, you'll see your method is
exposed without the vararg attribute, which was the main point. Well, I
managed to get what I want automatically by creating a NAnt task for editing
IDL. Thanks for your help.

Signature
Best regards,
Ruslan Popov
"Peter Huang" [MSFT] - 16 Nov 2005 11:32 GMT
Hi
Thanks for your knowledge sharing.
Best regards,
Peter Huang
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.