Sergey Gromov snake.scaly at
Mon Feb 11 12:48:44 PST 2008

Serj Makaroff <serj-makaroff at> wrote:
> Thank you! It's work.
> But why ShellExecute() doesn't work and what is the difference between
> ShellExecuteA() and ShellExecuteW()?

There is no such Windows function like ShellExecute().  There is 
ShellExecuteA() which accepts ASCII (CHAR/CHAR*) parameters and returns 
compatible results, and ShellExecuteW() which accepts Unicode 
(WCHAR/WCHAR*) parameters and returns accordingly.  The ShellExecute is 
a macro defined in windows.h for C preprocessor, there is no such symbol 
in the OS.  This macro expands to either of the former functions 
depending on whether the _UNICODE macro is defined.  This holds true for 
most of Windows API.

This reminds me: why all the standard D headers declare Windows 
functions as

extern(Windows) export void SomeApiFunction() ?

What's the use for export attribute ?


More information about the Digitalmars-d-learn mailing list