Generate Win32OSProcessPlugin from VMConstruction-Plugins-OSProcessPlugin.oscog-nice.64
There are two important changes:
1) let GetCurrentDirectory and GetEnvironmentStrings return UTF8 encoded strings
2) fix STD_ERROR_HANDLE is not a HANDLE
details from MC commits:
Note: I'd like to use an OS constant defined in an OS header file (CP_UTF8), but I never know how to, except redefining my own macro function...
Note 2: every other string (including filename commands etc) passed to the plugin should better be UTF8-encoded, but I did not even started to inquire about it.
STD_ERROR_HANDLE is not a HANDLE
Like the name does not tell, but like the comment got it right, it is a pseudo handle.
Therefore, we cannot simply cast to (HANDLE) and directly use that as a FILE HANDLE.
We must go thru GetStdHandle() API
How the hell do i know that stuff?
I just don't.
But I read the compiler warnings (WIN64):
C4312: conversion from DWORD to HANDLE of greater size
That can't be right, so I just google: MSDN STD_ERROR_HANDLE
et voila, 1st link is to GetStdHandle...
I hope every one sees the value of a compiler warning now!