Re: Can you fix this program? : C++ Dynamic Array Problems
- From: "Russell Mangel" <russell@xxxxxxxxx>
- Date: Tue, 7 Mar 2006 12:34:48 -0800
Carl Daniel wrote: The main criticism would be why write it at all? This
code is spelled std::vector<T> in C++. There's simply no need to write
code like this except for the learning exercise of it. A few other
criticisms inline below.
The reason I didn't use std:vector is because I don't know how to marshal
the vector back to a Managed .NET client. I am dealing with an API which has
no managed equivilant "Extended MAPI 1.0". and I am calling this code from
Un-Managed clients and Managed clients. Of course I could loop through the
vector in Un-Managed code to build an Folder[] and return it to the clients,
but then this would be an additional loop. Is my thinking good here? Maybe
you have a better idea now that you know a little more what I am trying to
accomplish..
When doing C++/CLI Interop there are so many ways of doing things, it's head
spinning. My intention is to minimize marshalling data across the
Managed/Un-Managed zone. My idea is too pass a single string to the
unmanaged code, and then let the un-managed code build a collection and
return a pointer to the data. For a total of two Interops.
Thanks for taking the time to reply.
Russell Mangel
Las Vegas, NV
.
- References:
- Can you fix this program? : C++ Dynamic Array Problems
- From: Russell Mangel
- Re: Can you fix this program? : C++ Dynamic Array Problems
- From: Carl Daniel [VC++ MVP]
- Can you fix this program? : C++ Dynamic Array Problems
- Prev by Date: Re: Still need sample code for access to Win32 DLL
- Next by Date: Re: Can you fix this program? : C++ Dynamic Array Problems
- Previous by thread: Re: Can you fix this program? : C++ Dynamic Array Problems
- Next by thread: Re: Can you fix this program? : C++ Dynamic Array Problems
- Index(es):
Relevant Pages
|