Re: Return a pointer from COM's method



Thanks, but beside array of USHORT, I also need some method to return a
pointer to a structure or class. Please advise thanks.

Best Regards,
Acer Blue

"thatsalok" <thatsalok@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:uYW53LnYFHA.584@xxxxxxxxxxxxxxxxxxxxxxx
> Why don't you try SAFEARRAY for returning array of Short
>
> --
> cheers,
> Alok Gupta
> Visit me at http://alok.bizhat.com
> "msnews.microsoft.com" <acerblue@xxxxxxxxxxxx> wrote in message
> news:efCpcamYFHA.3840@xxxxxxxxxxxxxxxxxxxxxxx
> > Hi,
> > I'm new to COM programming. Currently I'm creating a COM dll and calling
a
> > lib that parsing and storing information. I'd like to create a method to
> > return the pointer for a particular array of data, is it possible to do
> that
> > in COM interface ?
> > eg:-
> > STDMETHOD(GetData)(USHORT** pData);
> >
> > When I try to call this method from C#, the compiler gives me interface
> > pointer casting error.
> >
> > Please advise. Thanks
> >
> > AcerBlue
> >
> >
>
>


.



Relevant Pages

  • Re: char **argv & char *argv[]
    ... "pointer to pointer to char". ... >> pointer)) pointing to the first element of an array. ... so we have to start adding more context. ... type "pointer to char", rather than "array MISSING_SIZE of char". ...
    (comp.lang.c)
  • Re: why cannot assign to function call
    ... hypothetical C-like languages, ... sizeof business would still indicate that a pointer was being passed. ... talk about variables of an array type. ... the earlier version of the standard didn't have numbered ...
    (comp.lang.python)
  • Re: multi dimensional arrays as one dimension array
    ... please - where does the standard say that such a conversion ... Pointer conversion yields a pointer to the same object as ... exist only where there are array declarations. ...
    (comp.lang.c)
  • Re: Evaluating unary *
    ... 'arr' exists, ... value can be used with the same syntax as would be used to access a 2D array of the kind you're referring to, but that 2D array is just a different way of looking as the same object that was already created by the definition of 'arr'. ... to me, it makes sense to return a pointer to the first value of an array, but to return the address of the pointer to the first value of an array, is not directly possible as such. ... lea eax, ...
    (comp.std.c)
  • Re: Copying an array slice (Was: Re: Difficulties with passing multi-dimensional arrays)
    ... > the pointer to array of unknown size. ... but it still compiles without a cast. ... unknown at compile time so nothing can be checked. ...
    (comp.lang.c)

Quantcast