search for: hstdout

Displaying 2 results from an estimated 2 matches for "hstdout".

Did you mean: stdout
2017 Jun 04
2
trying to get a minimal windows program linked with lld
...WriteFile(void *HANDLE, const void * lpBuffer, unsigned int nNumberOfBytesToWrite, unsigned int *lpNumberOfBytesWritten, void *lpOverlapped); static const char *message_ptr = "hello\n"; static const unsigned int message_len = 6; __attribute__((stdcall)) int _start(void) { void *hStdOut = GetStdHandle(-11); WriteFile(hStdOut, message_ptr, message_len, 0, 0); ExitProcess(0); } I use mingw-w64 like this: gcc -c test.c Create kernel32.def: EXPORTS ExitProcess GetStdHandle WriteFile Use dlltool to create kernel32.lib: dlltool -d kernel32.def -l kernel32.lib Then lin...
2017 Jun 04
2
trying to get a minimal windows program linked with lld
...WriteFile(void *HANDLE, const void * lpBuffer, unsigned int nNumberOfBytesToWrite,     unsigned int *lpNumberOfBytesWritten, void *lpOverlapped); static const char *message_ptr = "hello\n"; static const unsigned int message_len = 6; __attribute__((stdcall)) int _start(void) {     void *hStdOut = GetStdHandle(-11);     WriteFile(hStdOut, message_ptr, message_len, 0, 0);     ExitProcess(0); } I use mingw-w64 like this: gcc -c test.c Create kernel32.def: EXPORTS ExitProcess GetStdHandle WriteFile Use dlltool to create kernel32.lib: dlltool -d kernel32.def -l kernel32.lib Then lin...