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.Reflection.Missing.Value 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.com
"Binder" <rgondzur@NO_SPAM_aicsoft.com> wrote in message
news:OJ**************@TK2MSFTNGP12.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(Optional ByVal lngUserCode As Long) As
ADODB.Recordset
Thanks,
Rg