Click here to Skip to main content
15,911,896 members
Home / Discussions / COM
   

COM

 
GeneralRe: Correction to the above Pin
rwestgraham11-Apr-05 9:53
rwestgraham11-Apr-05 9:53 
GeneralProblem using ATL Object in other ATL Server Pin
andreasf5-Apr-05 20:26
andreasf5-Apr-05 20:26 
GeneralIHTMLDocument2 mouse handler Pin
Kharfax5-Apr-05 2:07
Kharfax5-Apr-05 2:07 
GeneralOutlook object library and windows service.. Pin
Muhammad Irfan Azam4-Apr-05 19:41
Muhammad Irfan Azam4-Apr-05 19:41 
QuestionFlash ActiveX MFC Control. Secure? Pin
RobotIntestines4-Apr-05 19:00
RobotIntestines4-Apr-05 19:00 
QuestionDLL and EXE files? Pin
123dotnet4-Apr-05 18:45
123dotnet4-Apr-05 18:45 
Generallinking to office-help Pin
sampad_m4-Apr-05 7:55
sampad_m4-Apr-05 7:55 
GeneralRe: linking to office-help Pin
rwestgraham7-Apr-05 12:33
rwestgraham7-Apr-05 12:33 
Well, you have an obvious solution - write a different version application for each version of Powerpoint.

There is a more elegant approach. This is pretty complicated to even explain. You'll have to be pretty strong on COM to be able to program this effectively.

Basically since your application needs to be compatible with different versions of the PowerPoint object library, you must decouple the application from any direct reference to the object library itself. That means you need to code your application against an abstract interface definition instead of the Powerpoint library itself.

You also have to create implementation DLLs for each version of PowerPoint you support. These have to contain concrete impementation classes and be compiled against the correct version of the Powerpoint object library.

Finally, you have to create a Class Factory that determines which version of Powerpoint is installed, and registers the correct implementation DLL at runtime, then returns the concrete Powerpoint class from the appropriate DLL that implements the abstract interface definition.

You install all concrete implementation DLLs on the target machine but you do not register any of them, because only the one that matches the current version of Powerpoint on the machine will register correctly anyway.

Since the Class Factory determines at runtime which version is currently installed, and actually registers the correct concrete implmentation DLL and then returns the implementation class, if your user decides to upgrade from example Office 98 to Office 2000, then the class factory will recognize that and automatically upgrade the concrete implmentation DLL.

Like I said, elegant, but not simple.

Robert
GeneralRe: linking to office-help Pin
sampad_m13-Apr-05 23:19
sampad_m13-Apr-05 23:19 
GeneralControl the Systemtray Pin
Anonymous2-Apr-05 5:30
Anonymous2-Apr-05 5:30 
GeneralRe: Control the Systemtray Pin
Anonymous2-Apr-05 21:17
Anonymous2-Apr-05 21:17 
Questionhow to call a function like "HRESULT test([in]byte* aaa);" using VBScript Pin
samfromcn31-Mar-05 15:19
samfromcn31-Mar-05 15:19 
AnswerRe: how to call a function like "HRESULT test([in]byte* aaa);" using VBScript Pin
rwestgraham31-Mar-05 18:27
rwestgraham31-Mar-05 18:27 
GeneralCookie read/write in COM Pin
Member 172086231-Mar-05 6:44
Member 172086231-Mar-05 6:44 
GeneralRe: Cookie read/write in COM Pin
Mike Dimmick31-Mar-05 10:24
Mike Dimmick31-Mar-05 10:24 
GeneralRe: Cookie read/write in COM Pin
Member 172086231-Mar-05 10:34
Member 172086231-Mar-05 10:34 
GeneralRe: Cookie read/write in COM Pin
Anonymous5-Apr-05 20:31
Anonymous5-Apr-05 20:31 
GeneralRe: Cookie read/write in COM Pin
1212121212116-Jun-06 1:49
1212121212116-Jun-06 1:49 
GeneralHelp me Pin
123dotnet30-Mar-05 16:42
123dotnet30-Mar-05 16:42 
GeneralGood Question Pin
ursus zeta2-Apr-05 7:59
ursus zeta2-Apr-05 7:59 
GeneralMultiple Inclusion Pin
gUrM33T30-Mar-05 13:34
gUrM33T30-Mar-05 13:34 
GeneralRe: Multiple Inclusion Pin
gUrM33T30-Mar-05 18:24
gUrM33T30-Mar-05 18:24 
GeneralProblem while Persisting Image into Control Pin
ajalilqarshi30-Mar-05 4:00
ajalilqarshi30-Mar-05 4:00 
GeneralLearning COM Pin
anil7529-Mar-05 7:45
anil7529-Mar-05 7:45 
GeneralRe: Learning COM Pin
_Andrew3-Apr-05 8:32
_Andrew3-Apr-05 8:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.