News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Testing a Simple App

Started by baltoro, December 28, 2010, 12:50:01 AM

Previous topic - Next topic

baltoro

I'm writing a library in assembly language. And I need help in testing this small component of it. It determines your operating system version. Unfortunately, I'm still running Windows XP, and, I'm trying to test the GetProductInfo function that was introduced with Windows Vista. I tried that basic concept with another function in another app, and I think I understand the process. I'm using LoadLibrary and GetProcAddress to obtain a pointer to the function, loading the five parameters on the stack, and using the CALL instruction to execute it.
The zip file includes the compiled executable, the assembly language file that I compiled it with, the OBJ file, and a text file that explains things. Please read the assembly file and tell me what you think. What I really need is someone that is operating Vista to test it. Older operating systems will just print out a text file telling you that you don't have Vista. Only if you have a MajorVersion of 6, will the code attempt to find and execute the GetProductInfo function. Thanks alot, I appreciate any help and/or comments.
The library that I'm working on is quite a bit larger, and does alot more than just tell you if you are running Vista. I'm trying to compile a DLL that will work correctly and reliably with any existing Windows operating system and processor. I'm trying to determine operating system version, processor capabilities, and the general security context (all without having to have administrative privileges). Systems before Windows 98, I'm not too concerned about, because the network security is non-existant.   
Thanks again for your consideration.
Baltoro

GregL

I took me a minute or two to realize the result is in the text file Result\VistaInfo.txt.  It's correct.

--------------------------------------------------------------------------------
The result of the test is:
--------------------------------------------------------------------------------
The Installed Operating System is: Windows Vista, Home Premium Edition.
The Build Number of the Operating System is: 6002
The Latest Service Pack installed is: Major: 2, Minor: 0
--------------------------------------------------------------------------------





dedndave

i am using XP MCE2005 here - the results are correct

if it helps, you may find some useful info in this thread...

http://www.masm32.com/board/index.php?topic=11963

there is some code there, of course
but the nice thing about that thread is -
it makes a great database of which OS's return what values

baltoro

Greg,
Thanks, that's what I was looking for.

...And, Dave,...
...thanks,...again,...I'm stealing your technique, remember? Don't feel bad,...I'm stealing Alex's (AKA Antariy) code too.
Actually, I'm using your method when the 'simple method' (GetVersionInfoEx) fails.

When I get the library complete to the point where I'm convinced it will work correctly. I will post it. It's mostly finished, I just have to add some stuff to really make it bulletproof.
Baltoro