[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 73d751: Generate Win32OSProcessPlugin from VMConstruction-...

GitHub noreply at github.com
Sat Jan 5 18:06:54 UTC 2019


  Branch: refs/heads/Cog
  Home:   https://github.com/OpenSmalltalk/opensmalltalk-vm
  Commit: 73d7517b37f1a18121b9301e4d1006930af0fc8b
      https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/73d7517b37f1a18121b9301e4d1006930af0fc8b
  Author: Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>
  Date:   2019-01-05 (Sat, 05 Jan 2019)

  Changed paths:
    M src/plugins/Win32OSProcessPlugin/Win32OSProcessPlugin.c

  Log Message:
  -----------
  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
https://docs.microsoft.com/en-us/windows/console/getstdhandle

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!
[skip travis]



      **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 mailing list