Re: For DLLs, what does export actually do?

2013-02-16 Thread Ben Davis
On 11/02/2013 16:06, Regan Heath wrote: On Sun, 10 Feb 2013 12:36:38 -, Ben Davis ent...@cantab.net wrote: DllMain is a weird one - it creates all sorts of linker errors if I try it with extern(C) instead of extern(Windows) (which is different from the other methods, which compile fine with

Re: For DLLs, what does export actually do?

2013-02-16 Thread Andrej Mitrovic
On 2/16/13, Ben Davis ent...@cantab.net wrote: Certainly DllMain isn't appearing in my export table, yet I've established (by calling MessageBoxA from inside DllMain - that was brave of me, wasn't it? :P) that it is being called. :) It's handled by the compiler itself, e.g.:

Re: For DLLs, what does export actually do?

2013-02-11 Thread Regan Heath
On Sun, 10 Feb 2013 12:36:38 -, Ben Davis ent...@cantab.net wrote: On 10/02/2013 08:17, Benjamin Thaut wrote: Am 10.02.2013 03:03, schrieb Ben Davis: My functions are export extern (Windows) - I think they're global...? For example: export extern(Windows) LRESULT DriverProc(DWORD_PTR

Re: For DLLs, what does export actually do?

2013-02-10 Thread Benjamin Thaut
Am 10.02.2013 13:36, schrieb Ben Davis: With the def, I get lines like DriverProc = _DriverProc@20. Without it, I get lines like _DriverProc@20 = _DriverProc@20. Then you did hit this 3 year old bug: http://d.puremagic.com/issues/show_bug.cgi?id=3956

Re: For DLLs, what does export actually do?

2013-02-10 Thread Ben Davis
On 10/02/2013 08:17, Benjamin Thaut wrote: Am 10.02.2013 03:03, schrieb Ben Davis: My functions are export extern (Windows) - I think they're global...? For example: export extern(Windows) LRESULT DriverProc(DWORD_PTR dwDriverId, HDRVR hdrvr, UINT msg, LONG lParam1, LONG lParam2) nothrow {

Re: For DLLs, what does export actually do?

2013-02-10 Thread Ben Davis
On 10/02/2013 12:39, Benjamin Thaut wrote: Am 10.02.2013 13:36, schrieb Ben Davis: With the def, I get lines like DriverProc = _DriverProc@20. Without it, I get lines like _DriverProc@20 = _DriverProc@20. Then you did hit this 3 year old bug: http://d.puremagic.com/issues/show_bug.cgi?id=3956

Re: For DLLs, what does export actually do?

2013-02-10 Thread Ben Davis
On 10/02/2013 14:11, Ben Davis wrote: Which would imply the bug was fixed at some point. ...though of course it would need verifying with the example actually quoted in the bug, since there may be subtle differences. (Hopefully I'm just stating the obvious.)

Re: For DLLs, what does export actually do?

2013-02-09 Thread Benjamin Thaut
Am 09.02.2013 21:35, schrieb Ben Davis: Hi, I'm working on a multimedia driver DLL, i.e. one that Windows loads on behalf of any program that uses the Windows multimedia API. I'm using a .def file with an EXPORTS section, and I've also got all the relevant functions marked as 'export' in the

Re: For DLLs, what does export actually do?

2013-02-09 Thread Andrej Mitrovic
On 2/9/13, Ben Davis ent...@cantab.net wrote: Hi, I'm working on a multimedia driver DLL, i.e. one that Windows loads on behalf of any program that uses the Windows multimedia API. I'm using a .def file with an EXPORTS section, and I've also got all the relevant functions marked as 'export'

Re: For DLLs, what does export actually do?

2013-02-09 Thread Ben Davis
On 09/02/2013 20:44, Andrej Mitrovic wrote: On 2/9/13, Ben Davis ent...@cantab.net wrote: Hi, I'm working on a multimedia driver DLL, i.e. one that Windows loads on behalf of any program that uses the Windows multimedia API. I'm using a .def file with an EXPORTS section, and I've also got all

Re: For DLLs, what does export actually do?

2013-02-09 Thread Ben Davis
On 09/02/2013 20:39, Benjamin Thaut wrote: Am 09.02.2013 21:35, schrieb Ben Davis: Hi, I'm working on a multimedia driver DLL, i.e. one that Windows loads on behalf of any program that uses the Windows multimedia API. I'm using a .def file with an EXPORTS section, and I've also got all the