//
archives

Archive for

The STA Singleton COM Object – Problems and Solutions Part 1.

1. Introduction. 1.1 Singleton COM objects are guarenteed to be the only instances of coclasses. 1.2 However, what about their apartment ? Do they always run in the same apartment ? The answer depends on the apartment model that they use. 1.3 For MTA singleton objects : yes. They will always run in the one and only … Continue reading

Noncreatable COM Objects – Part 3.

1. Introduction. 1.1 In part 1 of this series of articles, I expounded the technique of developing a noncreatable COM coclass by omitting the use of the OBJECT_ENTRY_AUTO() macro. 1.2 In part 2 I wrote about using an alternative technique of using the OBJECT_ENTRY_NON_CREATEABLE_EX_AUTO() macro. 1.3 Next in line is a non-standard technique that I personally suggest : by … Continue reading

Noncreatable COM Objects – Part 2.

1. Introduction. 1.1 In part 1 of this series of articles, I discussed the technique of developing a noncreatable COM coclass by omitting the use of the OBJECT_ENTRY_AUTO() macro. 1.2 Here in part 2, another approach will be explored : by the use of the OBJECT_ENTRY_NON_CREATEABLE_EX_AUTO() macro. 1.3 Possible advantages of this technique will be explored. … Continue reading

Noncreatable COM Objects – Part 1.

1. Introduction. 1.1 COM coclasses may be declared as noncreatable and interfaces from instances of such coclasses can be stipulated to be obtainable only from interface methods of other coclasses. 1.2 Making a coclass noncreatable can be a good option if instances of that coclass are meant to be used internally and are not meant for public consumption. 1.3 Exposing one or … Continue reading

Tip for Managed Applications that use COM objects – Type Libraries are Used at Runtime.

1. Introduction. 1.1 My last article Tip for Creating a COM Server Using C# – Apartment Marshaling and the Type Library centred on the fact that for managed COM servers used by an unmanaged client app, its REGASM.EXE generated type library is not used at runtime. 1.2 As mentioned in that article, the reasons managed COM … Continue reading

Tip for Creating a COM Server Using C# – Apartment Marshaling and the Type Library.

1. Introduction. 1.1 I had earlier published Creating a COM Server Using C#. The aim of that article was to expound on the basic coding requirements for creating a COM server using the C# language. 1.2 This write-up is one of several follow-up articles that are intended to provide additional supplementary tips, techniques and knowledge … Continue reading