digitalmars.D.announce - COM type library importer
- John C (13/13) Apr 09 2006 I've written an experimental tool that creates a D import module from a
- tjohnson at prtsoftware dot com (4/17) Apr 09 2006 Whooohooo!
- r (11/24) Apr 10 2006 this is great!
- John C (14/54) Apr 10 2006 I'll be uploading a bug-fixed version shortly which correctly generates
- r (3/57) Apr 10 2006 thanx, it helped.
- Carlos Santander (5/21) Apr 11 2006 A suggestion: wouldn't it be better to have those in your com module? I ...
- John C (2/25) Apr 11 2006 I agree. I'll make the change.
- John C (6/6) Apr 12 2006 TLibD v0.15 is now ready. I've been concentrating on making it generate
I've written an experimental tool that creates a D import module from a COM type library. It should save you from having to convert C headers for COM programming. Command line options that control the generated source code include: /comments - adds type library's helpstrings as comments /noenums - omits enum names /tabs - uses tabs to indent instead of spaces /indent - 10 or fewer indents /propget and /propput - prefixes for COM property accessors /module - the name of the generated module Try it out (at your own risk - this is, as I've said, experimental). http://www.paperocean.org/d/tlibd/ John.
Apr 09 2006
Whooohooo! Many thanks. I'll test it out and let you know how it goes. Tom In article <e1b3tk$2etj$1 digitaldaemon.com>, John C says...I've written an experimental tool that creates a D import module from a COM type library. It should save you from having to convert C headers for COM programming. Command line options that control the generated source code include: /comments - adds type library's helpstrings as comments /noenums - omits enum names /tabs - uses tabs to indent instead of spaces /indent - 10 or fewer indents /propget and /propput - prefixes for COM property accessors /module - the name of the generated module Try it out (at your own risk - this is, as I've said, experimental). http://www.paperocean.org/d/tlibd/ John.
Apr 09 2006
In article <e1b3tk$2etj$1 digitaldaemon.com>, John C says...I've written an experimental tool that creates a D import module from a COM type library. It should save you from having to convert C headers for COM programming. Command line options that control the generated source code include: /comments - adds type library's helpstrings as comments /noenums - omits enum names /tabs - uses tabs to indent instead of spaces /indent - 10 or fewer indents /propget and /propput - prefixes for COM property accessors /module - the name of the generated module Try it out (at your own risk - this is, as I've said, experimental). http://www.paperocean.org/d/tlibd/ John.this is great! but seems i am not smart enough to use it properly. i ran the program on msado15.dll and added the missing enums. when i try to use the following _Connection oDatabase = Connection.create!(_Connection); oDatabase will always be null. the same is for _Recordset oRecords = Recordset.create!(_Recordset); could you give me some pointers? thanx r
Apr 10 2006
r wrote:In article <e1b3tk$2etj$1 digitaldaemon.com>, John C says...I'll be uploading a bug-fixed version shortly which correctly generates enums. 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(); } Hope that helps.I've written an experimental tool that creates a D import module from a COM type library. It should save you from having to convert C headers for COM programming. Command line options that control the generated source code include: /comments - adds type library's helpstrings as comments /noenums - omits enum names /tabs - uses tabs to indent instead of spaces /indent - 10 or fewer indents /propget and /propput - prefixes for COM property accessors /module - the name of the generated module Try it out (at your own risk - this is, as I've said, experimental). http://www.paperocean.org/d/tlibd/ John.this is great! but seems i am not smart enough to use it properly. i ran the program on msado15.dll and added the missing enums. when i try to use the following _Connection oDatabase = Connection.create!(_Connection); oDatabase will always be null. the same is for _Recordset oRecords = Recordset.create!(_Recordset); could you give me some pointers? thanx r
Apr 10 2006
In article <e1eeha$di6$1 digitaldaemon.com>, John C says...r wrote:thanx, it helped. rIn article <e1b3tk$2etj$1 digitaldaemon.com>, John C says...I'll be uploading a bug-fixed version shortly which correctly generates enums. 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(); } Hope that helps.I've written an experimental tool that creates a D import module from a COM type library. It should save you from having to convert C headers for COM programming. Command line options that control the generated source code include: /comments - adds type library's helpstrings as comments /noenums - omits enum names /tabs - uses tabs to indent instead of spaces /indent - 10 or fewer indents /propget and /propput - prefixes for COM property accessors /module - the name of the generated module Try it out (at your own risk - this is, as I've said, experimental). http://www.paperocean.org/d/tlibd/ John.this is great! but seems i am not smart enough to use it properly. i ran the program on msado15.dll and added the missing enums. when i try to use the following _Connection oDatabase = Connection.create!(_Connection); oDatabase will always be null. the same is for _Recordset oRecords = Recordset.create!(_Recordset); could you give me some pointers? thanx r
Apr 10 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
Apr 11 2006
Carlos Santander wrote:John C escribió:I agree. I'll make the change.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?
Apr 11 2006
TLibD v0.15 is now ready. I've been concentrating on making it generate code that can be compiled without errors or having to hand-edit it. The zip file contains the source code if you're wondering how it's done. It's not too pretty, though. http://www.paperocean.org/d/tlibd/ John.
Apr 12 2006