At the moment I’ve been using Peek in the callback and also to load the manifest file from the resource’s #1 for exe, #2 for Dll into a cstring.
But I am also getting api calls with no handles returned, like with CreateIconFromResource(Ex) and no windows error either, ie GetLastError returns 0! How does that work in windows?
I’m using
Assert(Loc:Handle/Loc:Whatever,‘API whatever failed Windows Error’ & GetLastError())
after every API call so I know straight away when the API has failed. Its so intermittent, code thats previously worked, now doesnt work. Its an absolute mystery what is going. I’ve rebooted the virtual pc and rebooted the main win10 host in a bid to clear any potential instability caused. I’ve using code translated from StockOverFlow and I get it working and then next day it stops working. I have not got a clue what is going on with the machine!
At the moment, I have the manifests embedded in resources working, ie it loads them and puts the contents into a cstring and text control, some manifests in some of the exe’s/dll’s have the File signature EF BB BF which is UTF-8 text List of file signatures - Wikipedia before the start of the manifest file text <?xml version=“1.0”… . Because I didnt know if this file signature was causing a problem with the text control I’ve added code to strip it out just in case, but at the moment it doesnt matter, the text control displays the file signature, which is what I would prefer anyway.
TLDR I dont know WTF is going on with this computer, but I dont think David A Bayliss could criticize the defensive programming employed in this app.