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

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


Ugh! OLE?

John Simmons -- jms@connectnet.com
Friday, April 05, 1996

I've avoided it as long as I could, but now, it's inevitable - I think I
have to do some OLE coding.  Here's the scenario:

I have three (or more) apps which create/use a set of data files.  No single
app will supply 100% of the data in the data set, but they will all
contribute data to (and use data from) the dataset.

I need to provide a way for only one copy of the data to be in memory at any
given time, but have it accessible to any of the three apps (and possibly
more) at the same time.  There will be no visible user interface involved as
this will be to simply make data available to one or more apps.

This sounds like a job for OLE (automation?).  My view is that the first app
that runs will run another EXE which is in charge of reading/writing the
data to/from the hard drive, and telling any other apps that are
subsequently executed when the data has been changed by any of the other apps.

The programs must all work together on Win95, WinNT, and Win32s and are all
being developed using Visual C++ (from versions 1.52 to 4.1) and the
appropriate versions of MFC.  I'm looking for any decent books, advice, or
other references which will assist me in the design specification.  I know
next to nothing about OLE and its terminology so go slow and be patient with
me. 


/=========================================================\
| John Simmons (Redneck Techno-Biker)                     |
|    jms@connectnet.com                                   |
| Home Page                                               |
|    www2.connectnet.com/users/jms/                       |
|---------------------------------------------------------|
| ViewPlan, Inc. home page (my employer)                  |
|    www.viewplan.com/index.html                          |
|---------------------------------------------------------|
| IGN #12 American Eagle Motorsports Zerex Ford	          |
|    Teammates - Steve Stevens (#13 Hooters Ford and      |
|                               1995 IGN Points Champ)    |
|                Pat Campbell (#14 Dr. Pepper Ford)       |
| American Eagle Motorsports Team Page                    | 
|    www2.connectnet.com/users/jms/ignteam                |
|---------------------------------------------------------|
| Competitor - Longest Signature File On The Net          |
\=========================================================/




Ron Forrester -- rjf@infograph.com
Friday, April 05, 1996

[Mini-digest: 2 responses]

I'm learning OLE (COM to be more correct) myself, and this sounds like a 
job for the IDataObject interface (with possibly some custom interface as 
well).

You could create a server which manages the data, and hands the data out 
via the IDataObject interface. If its viewable data, then the server could 
implement the IViewObject interface.

rjf

-----From: Sheu Jiann Jyh 

John Simmons wrote:

>I need to provide a way for only one copy of the data to be in memory at any
>given time, but have it accessible to any of the three apps (and possibly
>more) at the same time.  There will be no visible user interface involved as
>this will be to simply make data available to one or more apps.

One way to share data between applications in Win32 is using Memory-map 
file. Our system(I'm student) has similar problem from porting Win16 APs
to Win32 APs with about 100000 lines code.

Thus I have written a Share Memory Server to provide Win16 API like 
wrapper for memory-map file. It works under Win95, WinNT, and will show
a icon on tray(like timer).

If you need it, I can mail you including source, help file and examples.
It can be used with OLE or without OLE. Both samples are given.

>The programs must all work together on Win95, WinNT, and Win32s and are all
>being developed using Visual C++ (from versions 1.52 to 4.1) and the
>appropriate versions of MFC.

I'm not sure the Share Memory Server works under Win32s, and I don't think
it will work under Win16. Share data between Win16 and Win32 is not easy.

I like to share experience with others ! :)

Regards,


Sheu Jiann Jyh from Taiwan
xxjyh@eembox.ncku.edu.tw




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