I am doing an application that comunicates vb6 with a cryptographic wrapper. The .net and interop part, up to now, is alright, fully working.
As my client is testing It, I just have a quick question:
[ComVisible(true)]
public SomeObjectComVisible GetThat(byte[] array){ ... }
I used, until now, either types that I exposed to com or int and string, and no problems until now.
Is it ok to use (.net) byte
or chould I use *char
?
When I mark the assembly to be visible and register to com interop, it creates a wrapper for it, or should I use some unmanaged type?
Ah, it is a vb6, not vbscript.
thanks a million
for those who seek the answer:
public SomeObjectComVisible GetThat([MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_UI1)]byte[] array)
the problem is with arrays. http://msdn.microsoft.com/en-us/library/z6cfh6e6.aspx and http://msdn.microsoft.com/en-us/library/75dwhxf7.aspx
Any non bittable type can be a chore. You can specify your own types so they are used, you just have to make use of
[ComVisible(true),
ClassInterface(ClassInterfaceType.None),
ProgId("SomeNamespace.SomeClass"),
Guid("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX")]
on top of the class
Thank you very much you all.
Great help