Binder,
You will have to pass a value of zero to the method. If it was a
variant, then you would pass the value of System.Reflecti on.Missing.Valu e to
the parameter, to indicate it is truly missing. Because it is a long
though, it will get the default value of zero if it is not passed.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard. caspershouse.co m
"Binder" <rgondzur@NO_SP AM_aicsoft.com> wrote in message
news:OJ******** ******@TK2MSFTN GP12.phx.gbl...
I am trying to call an ActiveX DLL written in VB6 from my C# app.
The function call has a single parameter that is declared optional.
How do I call it from C#?
The VB function is:
Public Function GetTasks(Option al ByVal lngUserCode As Long) As
ADODB.Recordset
Thanks,
Rg