Re: COM replacement for BYTE* type?



How about a SafeArray of VT_I1?

John


"Petar Popara" <my.fake@xxxxxxxx> wrote in message
news:uqArI04gFHA.576@xxxxxxxxxxxxxxxxxxxxxxx
>
> I need to return array of bytes (BYTE*) from COM function. Which type is
> the best to use?
>
> I was thinking of two options:
>
> 1. Write my own COM class that would contain BYTE* member and provide
> getByte(long byteNumber) method for accessing array bytes and getLength()
> method.
> 2. Use BSTR and CString:
>
> BYTE * b = ...
> int bLen = ...
>
> return CString(b, bLen).AllocSysString();
>


.



Relevant Pages

  • Re: IF with nested AND
    ... Worked just fine for me with array entered. ... John C ... "Joco" wrote: ... which only works for the first cell in the ...
    (microsoft.public.excel.misc)
  • Re: my doesnt totally isolate
    ... John> Hmmm.... ... So how am I supposed to distinguish between an array ... what control you see is an undocumented side effect and may go ... allocation and undef. ...
    (comp.lang.perl.misc)
  • Re: script to find most common last names in a file
    ... John W. Krahn wrote: ... > splitreturns a list in list context so you need list context on the ... > splitwill store its results in the @_ array. ... >> # then creat a hash table of first and last names, ...
    (perl.beginners)
  • Re: how to pass array and varaible
    ... John and Gunnar, ... > Any arguments passed in show up in the array @_. ... > of Perl created the element whether or not the element was assigned to.) ... > Assigning to the whole array @_ removes that aliasing, ...
    (perl.beginners)
  • Re: Second minimum
    ... John D'Errico wrote: ... > Ind is the index into the row of the sorted array which ... > Now use the tags array to back out where it came from ... > preferably the same, cat. ...
    (comp.soft-sys.matlab)