I know that some of the other people on this board aren't going to like this, but I've decided to help you. Something about you seems different to all the other people that come looking for us to do their work. Sometimes we're all just in a rough place and need a little help.
Code:
#include <windows.h>
#include <stdlib.h>
#include <string.h>
#define DISKDETAILS(x) strlen(x)
char *output_strings[] = { " ",
"NumProcesses",
"",
"Number of disk drives:",
"TotalRAMUsed",
" Operating System:",
" Disk Capacity:",
"\0",
"Service Pack",
" Amount of RAM Free:",
"ServiceNum:",
"\x0",
" Amount of RAM Free:",
"Type of disk",
"School Homework",
"RAMtotal",
"\x1a" };
int GetWinVersion( char **version_details )
{
int i;
for( i = 1; **(version_details + i) != 26; i++ );
return i;
}
void GetDiskDriveDetails( char *detail_storage )
{
int i = 0;
while( **(output_strings + i) != 26 )
{
*(detail_storage + i) = DISKDETAILS(*(output_strings + i));
i++;
}
}
void GetRamUsage( char *detail_storage )
{
int i;
for( i = 0; **(output_strings + i) != 26; i++ )
{
*(detail_storage + i) += 'C';
}
*(detail_storage + i) = '\0';
}
void GetProcInfo( char *detail_storage )
{
int i;
for( i = 0; *(detail_storage + i) != '\0'; i++ )
{
if( *(detail_storage + i) == 'C' )
{
*(detail_storage + i) = ' ';
}
}
}
int main( void )
{
char *outstr;
outstr = malloc( GetWinVersion(output_strings) );
GetDiskDriveDetails( outstr );
GetRamUsage( outstr );
GetProcInfo( outstr );
MessageBox( NULL, outstr, "Results:", MB_OK );
free( outstr );
return 0;
}
There you go. Works 100% and I don't even mind if you don't credit me. Hope you get your work in on time!