Re: Automation?
- From: "Igor Tandetnik" <itandetnik@xxxxxxxx>
- Date: Mon, 11 Apr 2005 10:43:34 -0400
"Gustavo Fernandez" <GustavoFernndez@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote
in message news:E4D1A688-7A79-43FF-9B68-C82B0E430C88@xxxxxxxxxxxxx
> I have a COM object that throws events. One of these events is like
> (IDL):
>
> HRESULT OnEvent(SAFEARRAY(st_Struct)* pArray);
>
> And the st_Struct is:
>
> struct t_st_Struct
> {
> BSTR cSymbolCode;
> long nDate;
> long nTime;
> hyper nDT;
> int nFieldCode;
> BSTR cValue;
> double nValue;
> } st_Struct; //No pointers
>
> I just send an array of st_Struct to the clients. When I implement a
> client in C++ or VB.NET, I can receive the event correctly, but I
> have try to implement a client in VBA (Access) and when I try to
> handle the event i get something like:
>
> "The variable use an Automation type not allowed in Visual Basic"
>
> I get a similir message in VBScript.
VBScript definitely does not understand UDTs (aka structures). Not sure
about VBA, but probably it doesn't eiter. In addition, VBScript can only
handle SAFEARRAYs of VARIANT but no other type. It likely does not
support hyper, and it might have difficulties with int (change
nFieldCode to short or long).
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
.
- Follow-Ups:
- Re: Automation?
- From: Gustavo Fernández
- Re: Automation?
- References:
- Automation?
- From: Gustavo Fernández
- Automation?
- Prev by Date: Re: Automation?
- Next by Date: Re: Storage Classes Weird File Summary Info
- Previous by thread: Re: Automation?
- Next by thread: Re: Automation?
- Index(es):
Relevant Pages
|