Hi
I am using optional parameter in my interface method definition like this
HRESULT method( [in, optional] VARIANT vParameter)
I tried to call this method in .net . but .net doesn't accepting optional
paramteres.
that is, if i call the method without parameters , compilation error is
coming.
Can somebody suggest me how to use optional MIDL input parameters in .net?
Waiting for your replies
Mattias Sj?gren - 14 Dec 2004 11:54 GMT
>I tried to call this method in .net . but .net doesn't accepting optional
>paramteres.
>that is, if i call the method without parameters , compilation error is
>coming.
That depends on which language you're using (.NET isn't a programming
language). VB.NET for example supports optional parameters, but C#
does not. In C# you instead pass in System.Type.Missing to any
optional VARIANT parameters.
Mattias

Signature
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.