Software Archive
Read-only legacy content
17060 Diskussionen

restricted COM interface anyone?

rahzan
Neuer Beitragender I
1.735Aufrufe
I have written a com server which uses assumed array inputs. however VBA (in ms access) givz the following compile error:
"Function or interface makred as restricted, Or the function uses an automation type not supported in Visual Basic"

Any hints as to wut the heck this means, will be most appreciated.

Tim
0 Kudos
3 Antworten
Intel_C_Intel
Mitarbeiter
1.735Aufrufe
Hi,

It's probably the "automation type" that it is complaining about. I don't remember about VBA, but I thinlk VB Script requires most arguments to be of type VARIANT. If that is the problem, you would have to change the data type to be VARIANT and get the SAFEARRAY from the VARIANT and deal with it as a SAFEARRAY.

The other (easier) thing to check is to make sure that the intent of your array argument is INOUT.

Leo
rahzan
Neuer Beitragender I
1.735Aufrufe
Thanks,
Methinks, intent=IN did it though why would it even be an allowed option if it fails (perhaps just for VBA??). INOUT works now.

Tim
Intel_C_Intel
Mitarbeiter
1.735Aufrufe
It's an option becuse it is only a VB restriction - VC, VF, and maybe other COM clients can handle an intent IN array just fine...

Leo
Antworten