Thread overview | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
May 19, 2011 status of shared-libs on Windows? | ||||
---|---|---|---|---|
| ||||
Hi folks, I've only used D on Linux so far, so I'm not clear on the current shared-library story on Windows. Consider an existing C++ application that can be extended by writing plugins, which are usually written in C or C++, and compiled as DLLs. Very generally speaking, is DMD capable of producing DLLs that could be used by such an application? If so, should I expect runtime-related issues if I create multiple plugins with DMD, and load them all into the app? (I recall some discussion about runtime problems with multiple shared libs, but perhaps that was in the context of a D program loading D shared-libs.) Thanks, Graham |
May 19, 2011 Re: status of shared-libs on Windows? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Graham Fawcett | Am 19.05.2011, 22:28 Uhr, schrieb Graham Fawcett <fawcett@uwindsor.ca>: > Hi folks, > > I've only used D on Linux so far, so I'm not clear on the current > shared-library story on Windows. Consider an existing C++ application that > can be extended by writing plugins, which are usually written in C or C++, > and compiled as DLLs. Very generally speaking, is DMD capable of producing > DLLs that could be used by such an application? Yep. Just be sure to use dll_helper as described in http://www.digitalmars.com/d/2.0/dll.html to intialize the runtime properly. > If so, should I expect runtime-related issues if I create multiple plugins with DMD, and load them all into the app? Never tried that. |
May 19, 2011 Re: status of shared-libs on Windows? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Trass3r | (I've already successfully created and used Matlab .mex/.dll plugins with D) |
May 19, 2011 Re: status of shared-libs on Windows? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Trass3r | dll helper is dead in latest release, you should use core.sys.windows.dll; Bug report for the website has been reported already. |
May 19, 2011 Re: status of shared-libs on Windows? | ||||
---|---|---|---|---|
| ||||
Attachments:
| I've even created a dll that is used as a keylogger hook thing for Windows with only D. |
May 20, 2011 Re: status of shared-libs on Windows? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jimmy Cao | Am 20.05.2011, 01:44 Uhr, schrieb Jimmy Cao <jcao219@gmail.com>:
> I've even created a dll that is used as a keylogger hook thing for Windows
> with only D.
Just remembering that I also created a COM dll with D to intercept DirectDraw calls in an old game.
|
May 20, 2011 Re: status of shared-libs on Windows? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Trass3r | On Fri, 20 May 2011 03:43:09 +0200, Trass3r wrote:
> Am 20.05.2011, 01:44 Uhr, schrieb Jimmy Cao <jcao219@gmail.com>:
>> I've even created a dll that is used as a keylogger hook thing for
>> Windows
>> with only D.
>
> Just remembering that I also created a COM dll with D to intercept DirectDraw calls in an old game.
Thanks, Trass3r et al! I'll give it a try in D, then.
Best,
Graham
|
May 20, 2011 Re: status of shared-libs on Windows? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Graham Fawcett | > Thanks, Trass3r et al! I'll give it a try in D, then.
Of course you can't create 64Bit dlls though ;)
|
May 20, 2011 Re: status of shared-libs on Windows? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Trass3r | On Fri, 20 May 2011 16:19:27 +0200, Trass3r wrote:
>> Thanks, Trass3r et al! I'll give it a try in D, then.
>
> Of course you can't create 64Bit dlls though ;)
D'oh! There's always something. :)
(I don't *think* this is a problem in my case, though.)
Cheers,
Graham
|
Copyright © 1999-2021 by the D Language Foundation