|
Something like this. This function isn't actually one I use, but it's really close. Basically, after the string is returned, a simple strcmp against the version you are looking for will tell you if it's the right version or not.
Codechar* GetVersionString(char* ExePath) { void * data; void * verloc; DWORD dwVerSize, PVL, PVH, dwExeVerSize, dwBufSize; char * szVerString; //Get the version size dwExeVerSize = GetFileVersionInfoSize(ExePath, (unsigned long*)&PVL); data = new char[dwExeVerSize]; if (!GetFileVersionInfo(ExePath, 0, dwExeVerSize, data)) { delete[] data; return NULL; } if (!VerQueryValue(data, "\\", &verloc, (PUINT)&dwVerSize)) { delete[] data; return NULL; } VS_FIXEDFILEINFO* vers = (VS_FIXEDFILEINFO*)verloc; PVH = vers->dwProductVersionMS; PVL = vers->dwProductVersionLS; int a,b,c,d; a = PVH >> 16; b = PVH & 0xffff; c = PVL >> 16; d = PVL & 0xffff; szVerString = new char[6]; if (b < 14) //1.13f or below { sprintf(szVerString, "%d.%d%d%c", a, b, c, (((d+1)/2)+0x60)); } else { sprintf(szVerString, "%d.%d.%d", a, b, c); } return szVerString; } ![]() ![]() ![]() ![]() ![]() ![]() |
|
Okay, I finalized the changes to the plugin format. It's enough that old plugins won't work, but the change is worth it I think. I've added a configuration routine that will allow the plugin to gather data however it wants(complete control passes over to it), and then that buffer is saved and then available to the patching function.
If I have time, I will be creating a plugin to release along with FG that will show how this can be used to do some really cool stuff. If I do get it done, I'll release the source for it as an example on how to do many things the plugin system will allow. If the few people who are familiar with the old plugin system(and the exe, to some point) would like to help out with this, I'd might could use the help. Bug me on MSN. ![]() ![]() ![]() ![]() ![]() ![]() |
|
The old plugin system that I'm tossing had asm injection. The test plugin I made for the dead AI fusion project has some asm injection.
Something different. It will take some asm, I think, if I can't figure out the calling convention on the stuff I'm looking at. EDIT - I really could also use someone willing to make up new images and such. If they are a modder too, they'll get to help me test my plugin. This post was edited 2 times, last edit by DiscipleOfAdun: Sep 8 2008, 7:31 am.
![]() ![]() ![]() ![]() ![]() ![]() |
|
Dear DiscipleOfAdun:
I could possibly make some graphics for you. Just describe what you envision, along with any technical specifications such as dimensions, color depth, file size, prefered format, etc. You want a spash screen and two background images for the credits/about screens, right? What about logo and icons (one for the program, and one for mods -- though it'd be really nifty if mods could import their own for a more unique identity)? ![]() ![]() ![]() ![]() ![]() ![]() |
|
Yeah, i forgot the icon.
Speaking of icons, i'm still trying to get the icon import working 100%...can't figure out how to get different sized ones yet. Not fair. Herc, I'll PM you with some info and such. PQ, we'll talk about what I want to do, probably via pm on BWAI, since I'm low on space here. I'd love the help, especially with what I've got planned. ![]() ![]() ![]() ![]() ![]() ![]() |