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

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


COM DLL's with VC1.52 MFC2.5

Shaun Wilde -- shaun.wilde@softel.co.uk
Monday, August 05, 1996

Environment:  VC++ 1.52, MFC 2.5, WFWG 3.11

I would like to implement a COM DLL using MFC 2.5 using Nested Classes.
I am seeking examples on how this can be done. Currently all the examples
I can find either don't use MFC or seem to only compile under 32-bit.

I have no need to support in-place editing or OLE automation.

I have access to the following:

MSDN and Dr Dobbs Journal
MFC Internals
Inside OLE2

I am currently using the Koala / Polyline examples from Inside OLE 2 as
an approach but I would definitely like to use a more MFC based approach as
I can see a need for porting to 32-bit in the not to distant future

Any help is greatly appreciated

Shaun Wilde
---------------------------------------------------
Some people can tell the time by looking at the sun
but I can never make out the numbers
---------------------------------------------------




Dean Wiles -- deanw@mail.isc-br.com
Thursday, August 08, 1996

At 04:14 PM 8/5/96 +0000, you wrote:
>Environment:  VC++ 1.52, MFC 2.5, WFWG 3.11
>
>I would like to implement a COM DLL using MFC 2.5 using Nested Classes.
>I am seeking examples on how this can be done. Currently all the examples
>I can find either don't use MFC or seem to only compile under 32-bit.
>
>I have no need to support in-place editing or OLE automation.
>
>I have access to the following:
>
>MSDN and Dr Dobbs Journal
>MFC Internals
>Inside OLE2
>
>I am currently using the Koala / Polyline examples from Inside OLE 2 as
>an approach but I would definitely like to use a more MFC based approach as
>I can see a need for porting to 32-bit in the not to distant future
>
>Any help is greatly appreciated
>
>Shaun Wilde
>---------------------------------------------------
>Some people can tell the time by looking at the sun
>but I can never make out the numbers
>---------------------------------------------------
>


First off, I'm not sure how well or even if COM is supported in the 16-bit
world, but there are some 32-bit examples that may give you a starting point:

1) The ActiveX Template Library from Microsoft is a lightweight COM server
that provides the bare minimum for a COM-based DLL or EXE.  It comes with an
AppWizard to create the project and source modules (however I haven't tried
it with anything earlier than VC++ 4.1).  Also, there was NOT at the time
any ClassWizard support to quickly add new methods like there is for the OLE
Dispatch interfaces - you just have to do them by hand, although I hear that
may change in the future (maybe VC++ 4.2 or later).  Anyways, check out
http://www.microsoft.com/visualc/v42/atl/default.htm for more info on the
ActiveX Template Library.

2) The VC++ 4.2 AppWizard can make an OLE Automation DLL with a Dispatch
interface whose methods and properties can be defined using ClassWizard.
Again this is 32-bit and I haven't tried it with older versions of VC++.

In general Microsoft is not looking back to the 16-bit world, so your COM
stuff will be better developed and supported in 32-bit and with the VERY
LATEST Microsoft tools since it's evolving so fast.

Hope this helps.  Dean.
--------------------------------------------------------------------------
Dean Wiles (deanw@mail.isc-br.com)          Olivetti North America
Phone:  (509)927-7037                       22425 East Appleway Ave
Fax:    (509)927-2499                       Liberty Lake, WA 99019-9534
If the Son sets you free, you will be free indeed.  (John 8:36)





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