add skeleton for new attrib.exe application

Juan Lang juan.lang at
Thu Aug 13 17:49:44 CDT 2009

Hi EA, some comments on your tiny little app:

+#define WIN32_LEAN_AND_MEAN
+#include "config.h"
+#include <windows.h>
+#include <stdio.h>
+#include <stdlib.h>

You don't need to define WIN32_LEAN_AND_MEAN for compiling with Wine's
headers, and you don't need to include <windows.h>, either.  Also,
since you never use any of the standard library functions, you don't
need to include <stdio.h> or <stdlib.h>.  A useful starting point when
compiling with Wine's headers is:
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"

+int main( int argc, char *argv[] )
+    exit(0);

As Jeff pointed out in bug 18059, just return 0 rather than calling
exit(0).  I don't think you need to use wmain rather than main for an
empty application, but if you ever intend to work with the command
line, wmain is probably better.

More information about the wine-devel mailing list