G
Guest
Hi.
I have an ActiveX control created by MFC.
One method has the following definition:
[id(1), helpstring("method MyMethod")] SHORT MyMethod(BSTR p1, [optional]
VARIANT p2, [optional] VARIANT p3);
In VB6, I can call this method by the following three ways:
1. MyMethod(p1)
2. MyMethod(p1, p2)
3. MyMethod(p1, p2, p3)
But in VB.NET, only the first and third call can be done.
When I write code like the second one, VS.NET says "Overload resolution
failed because no accessible 'MyMethod' accepts this number of arguments".
It seems I must call this mehod with
MyMethod(p1, p2, Type.Missing)
What's wrong? Or I can not use the second call at all in VB.NET?
Any suggestion will be appreciated.
Thank you in advance.
An
I have an ActiveX control created by MFC.
One method has the following definition:
[id(1), helpstring("method MyMethod")] SHORT MyMethod(BSTR p1, [optional]
VARIANT p2, [optional] VARIANT p3);
In VB6, I can call this method by the following three ways:
1. MyMethod(p1)
2. MyMethod(p1, p2)
3. MyMethod(p1, p2, p3)
But in VB.NET, only the first and third call can be done.
When I write code like the second one, VS.NET says "Overload resolution
failed because no accessible 'MyMethod' accepts this number of arguments".
It seems I must call this mehod with
MyMethod(p1, p2, Type.Missing)
What's wrong? Or I can not use the second call at all in VB.NET?
Any suggestion will be appreciated.
Thank you in advance.
An