(CC'd vm-dev) On Mon, Aug 24, 2015 at 12:09 AM, Nicolai Hess <nicolaihess@web.de> wrote:
And If you want to review the changes:
https://github.com/nicolaihess/pharo-vm/compare/master...nicolaihess:win-lon...
I don't have a Windows machine to test on, but I perused the changes. one spelling defect ../platforms/win32/vm/sqWin32.h, line 452 "functiosn" Now my curiosity is aroused regarding sqFileDeleteNameSize() in [1]. Where does its parameter "char* fileNameIndex" get its null termination? I can only guess maybe the following definition in primitiveFileDelete.st [2] <var: 'nameIndex' type: 'char *'> automatically appends a null to the Smalltalk string. My understanding is that the Smalltalk string's internal representation is not null terminated. I ask since the sqFileDeleteNameSize()'s comment "convert the file name into a null-terminated C string" indicates the null is added by MultiByteToWideChar(), but [3] indicates that is not true -- that the output of MultiByteToWideChar() is only null terminated if the input is null terminated. Also, anyone know if the concern "BIG WARNING about the return value and the `cbMultiByte` parameter" expressed near the end of [3] is relevant? [1] ../pharo-vm/platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c [2] ../pharo-vm/mc/VMMaker.oscog.package/FilePlugin.class/instance/primitiveFileDelete.st [3] https://msdn.microsoft.com/en-us/library/windows/desktop/dd319072(v=vs.85).a...