At first, sorry if I'm wrong here. I couldn't really find a sub-forum that fits better.
Well, I'm currently working on an assembly injection to the world editor. It hooks into the save routine of the WE and skips the generation of certain files (war3map.doo etc) if no changes have been made that would alter this file. Instead, it looks into the opened map archive and copies the existing file from there. (It's actually saving me a lot of time already with my 8000 tree monster map)
Now, since this is a direct injection into the world editor, which has storm.dll loaded allready and successfully uses it to read from and write new maps, i thought i might as well use it.
However, i have found no real documentation of this library telling me how to use it to extract files from an archive. So i looked into the world editor trying to find out how IT reads from the archives, and it turned out to use Storm.Ordinal279, which, according to the internet, looks like this:
int __stdcall SFileLoadFile(char *filename, int a2, int a3, int a4, int a5)
Observing a few calls, i can now tell that
-a2 is a pointer to a pointer that will point to the buffer received
-a3 is a pointer to a DWORD that will contain the size of that buffer
-a4 and a5 are flags
Attentive Readers will have noticed that the function doesn't even take an archive as a parameter, just the file name of the file to be extracted. Calling it, it actually extracts from the correct archive, but only god (and blizzard) knows how and why.
So im dragging my paranoid body to this website constantly fearing that it extracts a file from some other random archive to get an answer to this weird question:
How does he know from which archive he should extract the files? Will it always be the correct file? Is it possible to actually tell Storm.dll from which archive i want to extract my files from?
TLDR: how the heck do i use Storm.dll?
Well, I'm currently working on an assembly injection to the world editor. It hooks into the save routine of the WE and skips the generation of certain files (war3map.doo etc) if no changes have been made that would alter this file. Instead, it looks into the opened map archive and copies the existing file from there. (It's actually saving me a lot of time already with my 8000 tree monster map)
Now, since this is a direct injection into the world editor, which has storm.dll loaded allready and successfully uses it to read from and write new maps, i thought i might as well use it.
However, i have found no real documentation of this library telling me how to use it to extract files from an archive. So i looked into the world editor trying to find out how IT reads from the archives, and it turned out to use Storm.Ordinal279, which, according to the internet, looks like this:
int __stdcall SFileLoadFile(char *filename, int a2, int a3, int a4, int a5)
Observing a few calls, i can now tell that
-a2 is a pointer to a pointer that will point to the buffer received
-a3 is a pointer to a DWORD that will contain the size of that buffer
-a4 and a5 are flags
Attentive Readers will have noticed that the function doesn't even take an archive as a parameter, just the file name of the file to be extracted. Calling it, it actually extracts from the correct archive, but only god (and blizzard) knows how and why.
So im dragging my paranoid body to this website constantly fearing that it extracts a file from some other random archive to get an answer to this weird question:
How does he know from which archive he should extract the files? Will it always be the correct file? Is it possible to actually tell Storm.dll from which archive i want to extract my files from?
TLDR: how the heck do i use Storm.dll?