Parsing the current build-number from a external program
cH40z-Lord
Join Date: 2009-07-26 Member: 68269Members, Reinforced - Shadow
in Modding
Hey guys,
I'm currently working on a more or less small project, which I may announce later in this forum as I made some progress, and now I'm wondering which file contains the current build number ( later on maybe the whole version ?) of NS2.
Please note I'm not creating any mod so I can't use Lua calls.
Hope anyone can help me out :)
Cheers!
I'm currently working on a more or less small project, which I may announce later in this forum as I made some progress, and now I'm wondering which file contains the current build number ( later on maybe the whole version ?) of NS2.
Please note I'm not creating any mod so I can't use Lua calls.
Hope anyone can help me out :)
Cheers!
Comments
That's all I need ^_^
To get the true current build number you could just load Engine.dll and call "<b>?GetBuildNumber@M4@@YAIXZ</b>" AKA "<b>M4::GetBuildNumber</b>". You could optionally just pattern match and parse that function if you don't want to load the dll and it's dependencies. NS2.exe uses that function to report's its build number so it's guaranteed to be correct (unless the function is deprecated and not updated).
Multiple binaries also contain the string pattern "c:\users\admin\build\engine\tags\build_203\bin\ship\" so you could always look for that too but it's not guaranteed to be there in newer builds and it has a lot of elements that could change.