Valhalla Legends Forums Archive | Battle.net Bot Development | Storm.dll

AuthorMessageTime
UserLoser.
Who has a fairly large list of ordinals and their usage?  I lost mine a while ago and I have nothing to work with, and I'm trying to start fresh again.  I'm specifically looking for SFile* and SBig* things, so any help is appreciated.
September 17, 2005, 1:29 AM
HdxBmx27
Umm I found this a long time ago on the forums. This what you want?

[code]**note - these are all __stdcall unless otherwise noted


120 SNetPerformUpgrade(int)
122 SNetReceiveTurns(void **,int,int,int,int);

132 int __fastcall 0CDebugSCritSect(LPCRITICAL_SECTION lpCriticalSection)
141 public: __thiscall CDebugSRWLock::CDebugSRWLock(void)
142 public: __thiscall CSRWLock::CSRWLock(void)
143: public: __thiscall SCritSect::SCritSect(void)
144 public: __thiscall SEvent::SEvent(BOOL bManualReset,BOOL bInitialState)
145 public: __thiscall SSyncObject::SSyncObject(void)
146 public: __thiscall CDebugSCritSect::~CDebugSCritSect(void)
147 public: __thiscall CDebugSRWLock::~CDebugSRWLock(void)
148 public: __thiscall CSRWLock::~CSRWLock(void)
149 public: __thiscall SCritSect::~SCritSect(void)
152 public: __thiscall SSyncObject::~SSyncObject(void)
153 SFile::Close(SFile *)
154 public: static int __fastcall SThread::Create(unsigned int (__stdcall *)(void *),void *,class SThread &,char *)
155 SFile::CreateOverlapped(SOVERLAPPED *)
156 SFile::DestroyOverlapped(OVERLAPPED *)
157 SFile::EnableHash(bool)
158 public: void __thiscall CDebugSCritSect::Enter(char const *,unsigned long)
159 public: void __thiscall CDebugSRWLock::Enter(int,char const *,unsigned long)
160 public: void __thiscall CSRWLock::Enter(int)
161 int SCritSect::enter(void)
162 SFile::FileExists(char const *)
163 SFile::GetActualFileName(SFile *,char *,unsigned long)
164 SFile::GetBasePath(char *,unsigned long)
165 SFile::GetFileSize(SFile *,unsigned long)
166 public: void __thiscall CDebugSCritSect::Leave(char const *,unsigned long)
167 public: void __thiscall CDebugSRWLock::Leave(int,char const *,unsigned long)
168 public: void __thiscall CSRWLock::Leave(int)
169 int SCritSect::leave(void)
170 SFile::Load(SArchive *,char const *,void **,unsigned long *,unsigned long,unsigned long,SOVERLAPPED *)
171 SFile::LoadFile(char const *,void **,unsigned long *,unsigned long, SOVERLAPPED *)
172 SFile::Open(char const *,SFile **)
173 SFile::PollOverlapped(SOVERLAPPED *)
174 SFile::Read(class SFile *,void *,unsigned long,unsigned long *,struct SOVERLAPPED *,struct _TASYNCPARAMBLOCK *)
175 public: int __thiscall SEvent::Reset(void)
176 SFile::ResetOverlapped(SOVERLAPPED *)
177 int __fastcall SCreateThread(unsigned int (__stdcall *)(void*),void*,unsigned int*,void*,char*);
188 public: int __thiscall SEvent::Set(void)
189 SFile::SetBasePath(char const *)
190 SFile::SetFilePointer(SFile *,long,long*,unsigned long)
191 SFile::Unload(void *)
193 int __stdcall WaitMultiplePtr(BOOL bWaitAll,DWORD dwMilliseconds)
194 SFile::WaitOverlapped(struct SOVERLAPPED *)192 int __stdcall Wait(DWORD dwMilliseconds)



223 SSetLocale (sets the current locale by calling SetLocale inside the ms runtimes)
251 SFileAuthenticateArchive(int,int)
252 SFileCloseArchive(HANDLE hArchive)
253 SFileCloseFile(HANDLE hFile)
254 SFileDdaBegin* (begins dda)
255 SFileDdaBeginEx (begins dda)
256 SFileDdaDestroy (cleanup for the dda code)
257 SFileDdaEnd* (ends dda)
258 SFileDdaGetPos* (something to do with dda and position)
259 SFileDdaGetVolume* (gets the volume for dda)
260 SFileDdaInitialize (initalizes the dda code)
261 SFileDdaSetVolume* (sets the volume for dda)
262 SFileDestroy (cleanup for the file code)
263 SFileEnableDirectAccess* (no idea)
264 SFileGetFileArchive(HANDLE hFile,int)
265 SFileGetFileSize(HANDLE hFile, int *fileSizeHigh)
266 SFileOpenArchive(char *name, int flags, int, HANDLE *hArchive)
267 SFileOpenFile(char *lpFileName,HANDLE hFile)
268 SFileOpenFileEx(HANDLE hArchive, char *fileName, int, HANDLE *hFile)
269 SFileReadFileEx2(HANDLE hFile, void *buffer, int toRead, int *read, int)
270 SFileSetBasePath(int)
271 SFileSetFilePointer(HANDLE hFile, int filePos, int *filePosHigh, int method)
272 SFileSetLocale(__int16)
273 SFileGetBasePath(int,int)
274 SFileSetIoErrorMode* (no idea)
275 SFileGetArchiveName(int,int,int)
276 SFileGetFileName(int,int,int)
277 SFileGetArchiveInfo* (gets some archive info, like what its priority in the search list is and if its on the CDROM)
278 SFileSetPlatform* (no ideas)
282 SFilePrioritizeRequest* (no idea)
283 SFileCancelRequest* (no idea)
286 SFileEnableSeekOptimization* (no idea)
288 SFileCancelRequestEx* (no idea)
299 SFileAuthenticateArchiveEx(int,int,int,LONG lDistanceToMove,int,DWORD NumberOfBytesRead)


301 StormDestroy (frees up all storm resources)


321 SBmpDecodeImage
323 SBmpLoadImage(int,int,int,int,int,int,int)
324 SBmpSaveImageSBmpSaveImage(int,int,int,int,int,int)
325 SBmpAllocLoadImage(char *filename,int,int,int,int,int,int,int)
326 SBmpSaveImageEx(char *str,int,int,int,DWORD NumberOfBytesWritten,int,LPCVOID lpBuffer)

331 SCodeCompile(char *src,int,int,int,int,int)
335 SCodeGetPseudocode(int,int,int)

341 is probobly SDrawAutoInitalize (does a bunch of stuff including initalizing directdraw)
// not sure about official name for this one
342 GetScreenshot(char *path);
344 is probobly SDrawDestroy (frees the resources associated with the window drawing engine I think)


382 SGdi1
383 SGdi2
392 SGdi4

401 void *__stdcall SMemAlloc(int amount,char *filename,int line,int defaultValue)
403 SMemFree(int,int,int,int)
404 SMemGetSize
405 SMemReAlloc(int,int,int,int,int);

421 int SRegLoadData(HKEY hKey,LPCSTR lpValueName,HKEY phkResult,LPBYTE lpData,int,DWORD Type);
427 SGetBlizzardRegKey (returns either Software\Battle.net\ or Software\Blizzard Entertainment\ depending on the paramater passed in)

434 STrans1
436 STrans2
437 STrans4
438 STrans3
439 STransLoadI(int,int,int,int);
440 STrans7
443 STrans5
447 STransLoadE(int,int,int,int);


451 SVidDestroy
452 SVidGetSize (get the size of a video)
453 SVidInitialize
454 SVidPlayBegin
455 SVidPlayBeginFromMemory
456 SVidPlayContinue
457 SVidPlayContinueSingle
458 SVidPlayEnd

461 SErrDisplayError(int,int,DWORD ExitCode,int,int,UINT uExitCode)
462 SErrGetErrorStr
463 SErrGetLastError
465 SErrSetLastError(DWORD dwErrCode)

475 ? - ProcessToken

481 SMemFindNextBlock
482 SMemFindNextHeap
483 SMemGetHeapByCaller
484 SMemGetHeapByPtr
485 SMemHeapAlloc
486 SMemHeapCreate
487 SMemHeapDestroy
488 SMemHeapFree
489 SMemHeapReAlloc
490 SMemHeapSize
491 int SMemCpy(void *src, void *dst, int count)
492 SMemSet (like memset)
493 SMemMove (like memmove)
494 int SMemZero(void *buf, int count)
497 SMemDumpState

501 int SStrNCpy(char *dst, char *src, int count)
502 DWORD SStrHash(LPCSTR String, BOOLEAN IsFilename, DWORD Seed)
505 SStrChrDbl (basicly its related to strchr but somehow tests 2 different strings)
506 SStrLen (like strlen)
507 SStrDup (like strdup)
508 int SStrCmp(char *str1,char *str2,size_t size);
509 int SStrCmpI(char *str1,char *str2,size_t size);
510 int SStrUpr(char *str)
551 SCompCompress (compresses stuff)
552 SCompDecompress (decompresses stuff)
Note - 569,571 and 570,572 are the same functions
569 char *__fastcall SStrChr(char *str,char c); // Returns the substring after the first occurance of the specific character in the string.  Returns NULL if the character is not found.
570 char *__fastcall SStrChrR(const char *str,char c); // Returns the address of the final occurance of c within the string str.  If it is not found, NULL is returned.
571 char *__stdcall SStrChr(char *str,char c); // Returns the substring after the first occurance of the specific character in the string.  Returns NULL if the character is not found.
572 char *__fastcall SStrChrR(const char *str,char c); // Returns the address of the final occurance of c within the string str.  If it is not found, NULL is returned.
579 SStrLwr(char *str)

548 Add to log file (not sure about official name)

601 SBigAdd(int,int,int)
602 SBigAnd(int,int,int)
603 SBigCompare(BigBuffer buf1,BigBuffer buf2)
604 SBigCopy(int,int)
605 SBigDec(int,int)
606 SBigDel(BigBuffer buf)
607 SBigDiv(int,int,int)
608 SBigFindPrime(int,int,int,int)
609 SBigFromBinary(BigBuffer *,const void *str,unsigned int num)
610 SBigFromStr(int,int)
611 SBigFromStream(int,int,int,int)
612 SBigFromUnsigned(BigBuffer buf,unsigned int value)
613 SBigGcd(int,int,int)
614 SBigInc(int,int)
615 SBigInvMod(int,int,int)
616 SBigIsEven(BigBuffer buf)
617 SBigIsOdd(BigBuffer buf)
618 SBigIsOne(BigBuffer buf)
619 SBigIsPrime(BigBuffer buf)
620 SBigIsZero(BigBuffer buf)
621 SBigMod(int,int,int)
622 SBigMul(int,int,int)
623 SBigMulMod(int,int,int,int)
624 SBigNew(BigBuffer **Buffer)
625 SBigNot(int,int)
626 SBigOr(int,int,int)
627 SBigPow(int,int,int)
628 SBigPowMod(int,int,int,int)
629 SBigRand(int,int,int)
630 SBigSet2Exp(int,int)
631 SBigSetOne(BigBuffer *buf)
632 SBigSetZero(BigBuffer *buf)
633 SBigShl(int,int,int)
634 SBigShr(int,int,int)
635 SBigSquare(int,int)
636 SBigSub(int,int,int)
637 SBigToBinaryArray(int,int,int)
638 SBigToBinaryBuffer(int,int,int,int)
639 SBigToBinaryPtr(int,int,int)
640 SBigToStrArray(int,int)
641 SBigToStrBuffer(int,char *dst,int count)
642 SBigToStrPtr(int,int)
643 SBigToStreamArray(int,int,int)
644 SBigToStreamBuffer(int,int,int,int)
645 SBigToStreamPtr(int,int,int)
646 SBigToUnsigned(int,int)
647 SBigXor(int,int,int)


649 SSignatureVerifyStream_Begin(int)
648 SSignatureVerify(int,int,int,int)
650 SSignatureVerifyStream_ProvideData(int)
651 SSignatureVerifyStream_Finish(int)
652 SSignatureGenerate(int,int,int,int,int,int)
653 SSignatureVerifyStream_GetSignatureLength()[/code]
~-~(HDX)~-~
September 17, 2005, 1:48 AM
kamakazie
[quote author=HdxBmx27 link=topic=12833.msg128408#msg128408 date=1126921687]
Umm I found this a long time ago on the forums. This what you want?
[/quote]

Wow very useful. Thank you very much. I recall someone mentioning putting these on BnetDocs. Perhaps they can be added now?
September 17, 2005, 2:13 AM
iago
That's all or part of my list (I don't feel like diffing, mentally or otherwise):

http://www.javaop.com/~iago/storm.txt

For reference, the vast majority of those I figured out, but not 100%.  Some of them I got off websites, mostly the SFile ones. 
September 17, 2005, 3:00 AM
HdxBmx27
meh I couldn't remember who I got them from.
I don't take credit for any of these, so don't yell at me :P
There from my old "/Backup/BNET/" folder so w/e
~-~(HDX)~-~
September 17, 2005, 3:10 AM
bethra
Noob question, but what does SBig and SFile mean?  StormBig and StormFile?
September 17, 2005, 5:25 AM
kamakazie
[quote author=Sorc.Polgara link=topic=12833.msg128446#msg128446 date=1126934757]
Noob question, but what does SBig and SFile mean?  StormBig and StormFile?
[/quote]

I'm pretty sure S is Storm. Big is are the functions for handling "big" numbers, or what is commonly known as arbitrary-precision integers. I don't know if those are the official names (I doubt it), but seeing as iago loves java and java's arbitrary-precision integer class is called "BigInteger"; he probably took it from there.
September 17, 2005, 8:41 AM
UserLoser.
[quote author=dxoigmn link=topic=12833.msg128457#msg128457 date=1126946482]
[quote author=Sorc.Polgara link=topic=12833.msg128446#msg128446 date=1126934757]
Noob question, but what does SBig and SFile mean?  StormBig and StormFile?
[/quote]

I'm pretty sure S is Storm. Big is are the functions for handling "big" numbers, or what is commonly known as arbitrary-precision integers. I don't know if those are the official names (I doubt it), but seeing as iago loves java and java's arbitrary-precision integer class is called "BigInteger"; he probably took it from there.
[/quote]

Most of those names are official.  Very old Storm.dll used to have the function names included (see one that comes with Diablo installation)
September 17, 2005, 1:51 PM
iago
Oops, my link sucked:
http://www.javaop.com/~iago/Storm.txt

Every function that I named is a real storm name, taken from the Macintosh version, except for the numbered ones (SGdi1, etc). 

I believe that the reasoning for this is that Mac doesn't have ordinal calling, so they have to use function names.  The problem is that the files aren't a 1:1 ratio, so you have to figure out what the x86 version does, then go back and find a suitable name.  Often I do it by figuring out what it calls and what is called, like "this file calls SMemAlloc with 150 bytes, then calls Storm_119.    Ok, on the Storm version, it calls SMemAlloc then SNetWhatever119Is".  Many of the functions were figured out like that. 

If you need the PPC version, talk to Kane or some other Mac user. 
September 17, 2005, 2:41 PM
UserLoser.
Thanks everyone
September 17, 2005, 2:48 PM
bethra
Noob question, but how would I go about calling a function by ordinal in C++?
September 19, 2005, 4:21 PM
iago
Look up GetProcAddress. 

It looks *something like* GetProcAddress(HMODULE module, char *name) -- instead of passing a string for the name, pass the ordinal number. 

HMODULE storm = LoadModule("storm.dll");
Func *func = GetProcAddress(storm, 401);

"Func" should be a typedef'd function.  I forget how to do that, but hopefully this is enough to get you started.  I haven't done Windowsy programming in some time, but I believe that that's the right way to do it.. 
September 19, 2005, 7:00 PM
Kp
[quote author=iago link=topic=12833.msg128691#msg128691 date=1127156456]HMODULE storm = LoadModule("storm.dll");
Func *func = GetProcAddress(storm, 401);

"Func" should be a typedef'd function.  I forget how to do that, but hopefully this is enough to get you started.  I haven't done Windowsy programming in some time, but I believe that that's the right way to do it.. 
[/quote]

A minor nit: the ordinal needs to be cast so that the compiler will accept it.  Use GetProcAddress(storm, (const char *) 401).  For the typedef:

[code]/* define a type which takes a DWORD, gives an int, and is stdcall.
* Use funcWait* to get a pointer suitable for pointing at the function Wait from the above ordinal list. */
typedef int (__stdcall funcWait)(DWORD dwMilliseconds);[/code]
September 20, 2005, 1:17 AM
iago
[quote author=Kp link=topic=12833.msg128735#msg128735 date=1127179037]
[quote author=iago link=topic=12833.msg128691#msg128691 date=1127156456]HMODULE storm = LoadModule("storm.dll");
Func *func = GetProcAddress(storm, 401);

"Func" should be a typedef'd function.  I forget how to do that, but hopefully this is enough to get you started.  I haven't done Windowsy programming in some time, but I believe that that's the right way to do it.. 
[/quote]

A minor nit: the ordinal needs to be cast so that the compiler will accept it.  Use GetProcAddress(storm, (const char *) 401).  For the typedef:

[code]/* define a type which takes a DWORD, gives an int, and is stdcall.
* Use funcWait* to get a pointer suitable for pointing at the function Wait from the above ordinal list. */
typedef int (__stdcall funcWait)(DWORD dwMilliseconds);[/code]
[/quote]

When I saw that you'd replied, for some reason the idea of casting it to (char*) entered my mind.  Thanks for the correction, it's been awhile since I've done that :)
September 20, 2005, 4:24 AM

Search