Re: Array of structures

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"Serge Baltic" wrote
>
> u> Can JScript use a COM object that is an array of structures? (ie. a
> u> C/C++ SafeArray of structures of the same type)
>
> I doubt that. The proper way to expose such a thing to scripting would be
> to implement the structure as an ActiveX object with corresponding properties,
> and to use the collection ActiveX object (that provides the Count, Item(n),
> and _NewEnum) to hold them instead of an array. In this case there'll be
> no problem of accessing it from a script.

How would it be used within the script?

Have not done much with ActiveX yet, only basic COM.
Do you have some references/links/keywords where I might find a similar sample?

The script and the C++ app are residing on the same machine.
Actually the script is used from within the same application.
The struct has POD types like this:
struct TS
{
int iVal;
float flVal;
char szVal[32];
};
TS aS[100];


TIA



.



Relevant Pages

  • Re: alignment when allocating an array of struct
    ... an array of struct with proper alignment. ... On systems where alignment must occur for proper acess to ...
    (comp.lang.c)
  • Re: [PATCH] console UTF-8 fixes
    ... At least please put them in a separate .c file and include a script to ... rbtree is an excellent data structure if you have to modify ... +static int bisearch(uint32_t ucs, const struct interval *table, int max) ...
    (Linux-Kernel)
  • Re: C++ Compiler with a -Wwarn-use-of-strcpy or similar option??
    ... > I need to automatically search and replace all fixed size ... > detect use of a strcpy to a buffer of fixed size. ... > struct x X; ... > provided the script can be guaranteed that the replacement is valid ...
    (comp.lang.cpp)
  • Re: Anyone have the perl unpack template for wtmp?
    ... I've looked through the utmp headers and can't quite get the unpack ... When I run the script using simple print ... > template or see what I've done wrong with my template? ... # This is the C struct from utmp.h, which was need to configure the ...
    (comp.sys.hp.hpux)
  • struct task_struct -> task_t
    ... It has come to my attention that in some places in the kernel, 'struct task_struct' ... I made a small script to change around as much as I could so that everything uses ... but all the forward declarations make it difficult. ... 'struct task_struct; typedef struct task_struct task_t;' pairs. ...
    (Linux-Kernel)