Re: Automation?

Tech-Archive recommends: Fix windows errors by optimizing your registry



"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


.



Relevant Pages

  • Re: Using record extension for keylogging
    ... In my OpenNexX window system but has worked ... not capable of reading the input for a specific client. ... The server-side window struct is like this: ... unsigned int flags; ...
    (comp.windows.x)
  • Re: GAC hell
    ... These engines work with managed objects, much in the way WSH works with COM objects, but they're different engines, at least the JScript engine is. ... The VBScript seems to be doing a lot of stuff in unmanaged code, so for all I know, they're somehow using WSH underneath, but I doubt it since I don't see how it would deal with managed objects. ... So my question has to do with the resolution of referenced managed assemblies, ... The scripting engine is a COM client and COM uses the registry to locate the COM server DLLthat contains the components as referred to by the scripts. ...
    (microsoft.public.dotnet.languages.csharp)
  • [PATCH 10/30] NFS: Generalise the nfs_client structure [try #11]
    ... Generalise the nfs_client structure by: ... Make nfs_get_client() wait interruptibly if it finds a client that it can ... struct nfs_client *clp; ... struct rpc_sequence ensures that RPC calls are sent in the exact ...
    (Linux-Kernel)
  • Re: C beginner: struct inside another struct...
    ... In that file i defined a structure of type _client, and a pointer of that type: ... struct sockaddr_in sock_name; ... add another `sizeof' bytes to the memory ...
    (comp.lang.c)
  • Re: Function Help Required
    ... VBScript is running on the server as part of the ASP page. ... The output in this case is JScript ... code that will be executed by the client in the browser. ... that the ArrayOfPlayerCodes has had the spaces removed form it's ...
    (microsoft.public.scripting.jscript)