COM type library importer

Carlos Santander csantander619 at gmail.com
Tue Apr 11 07:29:28 PDT 2006


John C escribió:
> 
> Ensure you're initializing COM with CoInitialize. I usually do so in a 
> static module ctor, like this:
> 
>     module main;
> 
>     import com;
> 
>     static this() {
>         CoInitialize(null);
>     }
> 
>     static ~this() {
>         CoUninitialize();
>     }
> 

A suggestion: wouldn't it be better to have those in your com module? I mean, 
they're going to be needed anyway, so why not make things easier for users?

-- 
Carlos Santander Bernal



More information about the Digitalmars-d-announce mailing list