.net - ParamArray Not Working With COM -


I have a class library, which is in contact with COM in this way:

  & Lt; ComClass (SomeClass.ClassId, SomeClass.InterfaceId, SomeClass.EventsId) & gt; Public Sub Category Class Class Class Class EIDID String = "GUID1" as public console interface in the form of the public sub-strings = "GUID2" public creation events string = "GUID3" Paramayare Value) "// some code here end sub and class  

Then I used regasm / tlb / codebase to register it. All the methods and properties are working correctly in VBA / VB6 but when I try to use the method with a Paramayer, it will not compile. I get an error:

Compile error:

The function or interface is marked as restricted, or the function does not use an automation type in Visual Basic Does

What do I need to do to properly highlight this method, so that I can use it like this ?:

  SomeClass SomeMethod 1, 2, 3   

function using an automation type Does not supported in Visual Basic.

The bonus stops there, in VB6, the parameter is not equal to the array. Drop the Paramahri keyword VB6 code to give an array of variants. Offensive, consider redesigning your class.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -