Article View: microsoft.public.win32.programmer.ole
Article #9Re: Dynamic 2-dimensional array as parameter for COM method?
From: Girish Bharadwaj [mvp]
Date: Wed, 27 Jan 1999 00:00
Date: Wed, 27 Jan 1999 00:00
34 lines
2016 bytes
2016 bytes
You can use size_is and pointer magic to represent what you want. But, I am not sure about VB being happy about that..:-( Something like HRESULT Foo([out]int * size1, [out]int* size2,[out,size_is(,*size1,*size2)] int *** arrayOfInts); might work.. Here you are representing pointer to arrayOfInts[*size1][*size2].. (I think ??) -- Girish Bharadwaj [VC++/MVP]. Please Dont send email queries to me .Post them on the newsgroups. Thank you David Morgenlender wrote in message <36b2516d.85013812@enews.newsguy.com>... >I have to pass a 2-dimensional array as an input parameter to a COM method. >Neither dimension is known at compile time. The interface is derived from >IUnknown. The clients will be written in C++ & VB. I already have dynamic >1-dimensional arrays working in both C++ & VB. But I haven't been able to find >any way to specify a dynamic 2-dimensional array in the .IDL file. I can, of >course, convert it to a 1-dimensional array as far as COM is concerned. But I'd >rather keep it as 2-dimensional, if possible, to keep the code more readable, >etc. > >Any ideas? > >======================================================= >Dave Morgenlender >e-mail: dmorgen@alum.mit.edu >=======================================================
Technical Details
Message-ID:
<euZJZ7eS#GA.161@uppssnewspub04.moswest.msn.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<36b2516d.85013812@enews.newsguy.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f9701,d933c915558e7daf X-Google-Attributes: gidf9701,public X-Google-Thread: 108cda,d933c915558e7daf X-Google-Attributes: gid108cda,public X-Google-Thread: fe15c,d933c915558e7daf X-Google-Attributes: gidfe15c,public From: "Girish Bharadwaj [mvp]" <girishb@mvps.org> Subject: Re: Dynamic 2-dimensional array as parameter for COM method? Date: 1999/01/27 Message-ID: <euZJZ7eS#GA.161@uppssnewspub04.moswest.msn.net> X-Deja-AN: 437510008 References: <36b2516d.85013812@enews.newsguy.com> Newsgroups: microsoft.public.win32.programmer.ole,comp.os.ms-windows.programmer.ole,borland.public.cppbuilder.activex X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3