To generate a image from RAW-DATA, you need to move the Var contents to SAFEARRAY ( for WIA ) or HGLOBAL ( for GDIPLUS ). There are examples already available in forum. Do do ask me, if you need a code example.

RANT:I have been creating compiled scripts ( SlideShow ). If I put around 20MiB worth of images in to my compiled script as resources, the the initial load time is around whopping 7 seconds. . The second run is instantaneous. This happens only in Win x64 and Panda antivirus. Win 8.1 and Win 10 loads my compiled EXEs super-fast the first time itself, but they have only Windows default AV (MSE, I guess)I will be using/posting a different solution for large resources (like 100s of MiB data)

jeeswg wrote:This is interesting:Loop, Parse, DLLHEX, XYAny reason not to use one delimiter?

When I start with an idea, I use the easiest, horrible way to achieve results and then optimize the code.XY must be an artifact from the original method of calling StringSplit twice: First on Y and then on X.

Btw if you have good links re. this, that would be most appreciated. To understand the structs and contents of a dll file.

You can see in my code: I internally stamp UNIXTIME inside the DLL.AHK2EXE doesn't do it. If you upload a compiled script to virustotal it will tell you the time Lexikos compiled AutoHotkeySC.bin.. not the time you compiled your scriptThat could be a challenge for you. Write a function that will patch a compiled script's internal creation time with file's created time.If you load my empty DLL into peinfo, you can see the UNIXTIME in File {COFF) header as third item.You can edit it.. like change it to 123 and then view the DLL in a HEX viewer to see at which offset it has written it.

E.g. this was inspired by an icon you created from hex, and it took a long time for me to unpick the hex to understand it.

Why unpick the hex? You should develop your own GUI tool to view Binary data.As for me, I can never understand a structure until I visually see it in a GUI. I insert a lib function that will pause the script with a GUI to show me the structure visually.When I can't get a structure, I use brute force methods to obtain one.

That's quite interesting about the timestamp. I would suppose you could use:File Objecthttps://autohotkey.com/docs/objects/File.htmYou could edit the binary data using WriteXXXType and use RawWrite to overwrite the file or write to another file.

I tend to always share links or things anyway but they seem to be especially important for file format definitions etc. So I might have thought that you had found some useful MSDN or other links at some point, e.g. on any structs. Cheers.

jeeswg wrote:By unpick the hex I meant to work out what each hex byte corresponds to, where the parameters/structs/data begin and end.

No! I am not filling any structures there.. I am just NumPut-ting as it appeared in the original empty dll file which was xpsp4res.dll patched and cleaned with peinfo tool.In other words: I am not creating a DLL from scratch! .. merely patching a few numbers in between 1024 byte long nulls.

I have some examples listed here where I tried to understand precisely how wav/bmp/ico files and the CRC-32 hash work. These were all very difficult to do, and the links were essential.

I like your native CRC-32 very much. Need to spend time on it to understand it. Good piece of learning material

I tend to always share links or things anyway but they seem to be especially important for file format definitions etc. So I might have thought that you had found some useful MSDN or other links at some point, e.g. on any structs. Cheers.

I develop hackish methods sometimes.. for which I cannot point to MSDN link or for the matter any link at all.For example: See my CreateDIB() vs your graphics: create bmp files from scratchI am using an undocumented method to suppress a tiny bitmap from becoming a gradient.

The icon files are inserted into the dll - but the resulting dll isn't useable as icon-dll.

All resources added with DLLPackFiles() should be considered as RT_RCDATA.If you store PNG versions of your ICONS as custom resource, you may simply read it with DllRead() and convert it to hiconwith a one line call to CreateIconFromResourceEx(). Using PNG icons will require WIN Vista and greater, though.

hoppfrosch wrote:Thanks - I'd prefer the first solution (separate function) - as I want to use the DLL without AHK as a standard icon-dll

Since the function has been written in quite a short notice, I couldn't test it as aggressively as I usually would.Please test and let me know. (The function is in next post/page)I will add the function to the main post after making any amends if necessary.