[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 73d751: Generate Win32OSProcessPlugin from VMConstruction-...
noreply at github.com
Sat Jan 5 18:06:54 UTC 2019
Author: Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>
Date: 2019-01-05 (Sat, 05 Jan 2019)
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!
**NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/
Functionality will be removed from GitHub.com on January 31st, 2019.
More information about the Vm-dev