See more up-to-date versions of Gdip_All.ahk, where some of these problems are fixed. E.g.:
The data is ANSI, so you need to use StrGet with CP0. This has been done in the updated function.
For reference, here the DllCall types are fixed for the BRA.ahk link you posted:
Code: Select all
;https://github.com/tariqporter/Gdip/blob/master/BRA.ahk
;e.g. RtlMoveMemory:
;before:
DllCall("RtlMoveMemory", "UInt", &BRAFromMemIn, "UInt", &NewHeader, "UInt", StrLen(NewHeader))
;after:
DllCall("RtlMoveMemory", "Ptr", &BRAFromMemIn, "Ptr", &NewHeader, "UPtr", StrLen(NewHeader))
;the other 6 DllCall lines:
;before:
h := DllCall("CreateFile", "Str", OutputFolder FileInfo1, "UInt", 0x40000000, "UInt", 0, "UInt", 0, "UInt", 4, "UInt", 0, "UInt", 0)
result := DllCall("WriteFile", "UInt", h, "UInt", &BRAFromMemIn+Info2+FileInfo2, "UInt", FileInfo3, "UInt*", Written, "UInt", 0)
h := DllCall("CloseHandle", "UInt", h)
h := DllCall("CreateFile", "Str", Output, "UInt", 0x40000000, "UInt", 0, "UInt", 0, "UInt", 4, "UInt", 0, "UInt", 0)
result := DllCall("WriteFile", "UInt", h, "UInt", &BRAFromMemIn, "UInt", Round(Info2)+Round(Info3), "UInt*", Written, "UInt", 0)
h := DllCall("CloseHandle", "UInt", h)
;after:
h := DllCall("CreateFile", "Str", OutputFolder FileInfo1, "UInt", 0x40000000, "UInt", 0, "Ptr", 0, "UInt", 4, "UInt", 0, "Ptr", 0, "Ptr")
result := DllCall("WriteFile", "Ptr", h, "Ptr", &BRAFromMemIn+Info2+FileInfo2, "UInt", FileInfo3, "UInt*", Written, "Ptr", 0)
h := DllCall("CloseHandle", "Ptr", h)
h := DllCall("CreateFile", "Str", Output, "UInt", 0x40000000, "UInt", 0, "Ptr", 0, "UInt", 4, "UInt", 0, "Ptr", 0, "Ptr")
result := DllCall("WriteFile", "Ptr", h, "Ptr", &BRAFromMemIn, "UInt", Round(Info2)+Round(Info3), "UInt*", Written, "Ptr", 0)
h := DllCall("CloseHandle", "Ptr", h)
Cheers.