Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to pass array? 1

Status
Not open for further replies.

Limin

Programmer
Nov 29, 2001
2
CA
Hi,
I defined a method:
[id(12), helpstring("method M4")] HRESULT M4([in] short nSize, [in, size_is(nSize)] double* a);

But I can only pass the first elements in the array. Any idea?

Thanks in advance
Limin

 
Hi, Volkoff:
Even if I added length_is. It does not work. But I found that even without length_is, it works for in-proc server. Does variable length does not work for out of process server?

Thanks
 
Correct definition (for example:):
[id(12), helpstring("method M4")] HRESULT M4([in] short nSize, [in, length_is(nSize)] double a[MAX_SIZE]);

and for [out] parameters:
[id(12), helpstring("method M5")] HRESULT M5([in, out] short * nSize, [out, length_is(*nSize), size_is(*nSize)] double a[]);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top