MCode4GCC -- C/C++ to MCode Generator

Post your working scripts, libraries and tools
User avatar
jeeswg
Posts: 6904
Joined: 19 Dec 2016, 01:58
Location: UK

Re: MCode4GCC -- C/C++ to MCode Generator

25 Nov 2019, 11:05

I tried the new version (with 2 edits) and it worked great. Thanks!

The 2 edits were to undo the 2 changes to Base64enc (which uses CryptBinaryToString), old script: 1, new script: (0x40000000|0x01).
I would use 1 because: (0x40000000|0x01) would potentially make the script fail on Windows XP and earlier, and 1 is sufficient since the new removeWhitespaceChars function has been added.

(Maybe on Windows XP and earlier, the 0x40000000 is accepted, but has no effect, or maybe it causes an error, it would be good if someone could test it.)
Last edited by jeeswg on 25 Nov 2019, 16:50, edited 1 time in total.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
joedf
Posts: 7412
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada
Contact:

Re: MCode4GCC -- C/C++ to MCode Generator

25 Nov 2019, 15:58

So I've just tested it under XP SP3: no crash or error with either or flag values. However, the base64 is always blank...
So the script seems to be breaking somewhere else... :think:
EDIT: StringToBinary() broken for XP...
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x8GB G.Skill RipJaws V - DDR4 3280 MHz | [About Me] | [ASPDM - StdLib Distribution]
[Populate the AHK MiniCity!] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library] | [About the AHK Foundation]
User avatar
jeeswg
Posts: 6904
Joined: 19 Dec 2016, 01:58
Location: UK

Re: MCode4GCC -- C/C++ to MCode Generator

25 Nov 2019, 16:52

I've updated my post above. So perhaps: replace (0x40000000|0x01) with 1, in 2 places, as it was in the original script.

And/or, StringToBinary, uses CryptStringToBinary. StringToBinary specifies a default value of CRYPT_STRING_HEXRAW := 0xC, which is not supported by Windows XP.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA

Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 17 guests