OutputDebugString()
Adam D. Ruppe via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Mar 13 14:19:07 PDT 2015
On Friday, 13 March 2015 at 21:12:52 UTC, Robert M. Münch wrote:
> How do I declare such missing Windows API functions myself?
In the file you want to use it, you can just write
extern(Windows) void OutputDebugStringA(in char*);
and it should work... or whatever the signature is, check msdn,
and remember the ones that take strings tend to need A or W for
the ascii or Unicode variants.
dmd comes with a bunch of windows lib link files but not all of
them. This one should work though. Just add the file, e.g.
user32.lib, to the compile command line. You can also do
pragma(lib, "user32");
and such in the main D file itself you are building and it will
add automatically.
More information about the Digitalmars-d-learn
mailing list