For DLLs, what does export actually do?

Benjamin Thaut code at benjamin-thaut.de
Sat Feb 9 12:39:41 PST 2013


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 code.
>
> What I'm finding is, if I remove the 'export' attribute but keep the
> EXPORTS section, it all still works; but if I keep the 'export'
> attribute and remove the EXPORTS section, then it doesn't work.
>
> Just wondering why this is, and whether the 'export' attribute is
> actually programmed to do anything at the moment :)
>
> Thanks,
>
> Ben :)

Yes it is, but its only working properly for global functions. It works 
partially for classes and not at all for all remaining cases. The export 
attribute is currently only usefull if you want to do a C-Style 
interface for your Dll.

Kind Regards
Benjamin Thaut


More information about the Digitalmars-d-learn mailing list