15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Xferring data from a COM object to client

William Drew -- solset@cais.com
Saturday, September 07, 1996


I have implemented a COM object in MFC 4.0 that contains all of the
data access functionality as well as the data in a mem cache. The
interface to the object allows for the container to pass a pointer to
pointer to a CPtrList derived class and the object assigns the pointer
to the list of CObject derived objects representing the requested
data. This works fine with C++ but I this object also needs to be used
by VB applications. Does OLE provide a means of transfer data that is
language independant? 

Environment: MSVC 4.1, NT 4.1

[Moderator's note: NT 4.1?  I didn't think 4.0 was widely available yet.]

William J. Drew
Solution Set, Inc.
solset@cais.com



Mike Blaszczak -- mikeblas@nwlink.com
Sunday, September 08, 1996

At 07:08 AM 9/7/96 GMT, you wrote:

>Does OLE provide a means of transfer data that is
>language independant? 

Yes: that's the whole crux of COM. You should read through "Insdie OLE"
by Kraig Brockshmidt, or through the OLE SDK books to understand the
mechanisms involved.  Visual BASIC likes to use SAFEARRAYs, so maybe
your best bet is to start there.

>Environment: MSVC 4.1, NT 4.1
>[Moderator's note: NT 4.1?  I didn't think 4.0 was widely available yet.]

Windows NT 4.0 Workstation and Windows NT 4.0 Server _are_ widely
available: according to www.microsoft.com, they were released to
manufacturing more than three weeks ago.  Last weekend, I was very
depressed and decided to sit behind my computer all weekend
I went to Egghead to buy some software to help me blow
up monsters, and found that they had crates of Windows NT 4. They mostly
had Workstation copies, but had some Server copies for special orders.

There's no such duck as NT 4.1 just now.

.B ekiM
http://www.nwlink.com/~mikeblas/
These words are my own. I do not speak on behalf of Microsoft.




Roger Onslow/Newcastle/Computer Systems Australia/
Tuesday, September 10, 1996

William J. Drew wrote:
>Does OLE provide a means of transfer data that is
>language independant? 

OLE has a variant type which can contain any type of information
There is also an array type supported.
So...
You should be able to create a "record" by having an array of variants (each 
variant having the appropriate type)
You can then make an array of "records"
And this should be language independant.

Roger




| Вернуться в корень Архива |