The SYSTEM_INFO structure is suppose to contain the member contained in the code below. I get an undefined symbol error on compilation.
That is weird because i can get all the other members in the structure prior to that one. Havn't attempted getting the ones after though.
Running on 98se. Not using the latest masm but i don't think it should matter.
__________________________________________________
invoke dwtoa,sysinfo.dwNumberOfProcessors,addr buffer
invoke StrLen,addr buffer
invoke TextOut,hdc,XPOS,YPOS,addr buffer,eax
Any help appreciated.
That is weird because i can get all the other members in the structure prior to that one. Havn't attempted getting the ones after though.
Running on 98se. Not using the latest masm but i don't think it should matter.
__________________________________________________
invoke dwtoa,sysinfo.dwNumberOfProcessors,addr buffer
invoke StrLen,addr buffer
invoke TextOut,hdc,XPOS,YPOS,addr buffer,eax
Any help appreciated.
Check windows.inc - maybe " dwNumberOfProcessors " is defined different.
Titan,
Dunno what you problem is,
Seems to work fine.
Regards,
hutch@movsd.com
Dunno what you problem is,
LOCAL sinfo:SYSTEM_INFO
invoke GetSystemInfo,ADDR sinfo
invoke dwtoa,sinfo.dwNumberOfProcessors,ADDR buffer1
invoke MessageBox,hWin,ADDR buffer1,
SADD("Processor Count"),MB_OK
Seems to work fine.
Regards,
hutch@movsd.com
Titan,
Dunno what you problem is,
LOCAL sinfo:SYSTEM_INFO
invoke GetSystemInfo,ADDR sinfo
invoke dwtoa,sinfo.dwNumberOfProcessors,ADDR buffer1
invoke MessageBox,hWin,ADDR buffer1,
SADD("Processor Count"),MB_OK
Seems to work fine.
Regards,
hutch@movsd.com
The only difference is my structure is define in uninitialised data.
sysinfo SYSTEM_INFO <>
I'll check windows.inc as JimmyClif suggests
rrrrrrrrrrrrrrrrrrrrrrrrrrrr
Titan,
I just changed the example to the structure in the .DATA? section and it still runs fine.
What version of MASM32 and windows.inc are you using ?
This is the STRUCT in windows.inc
Regards,
hutch@movsd.com
I just changed the example to the structure in the .DATA? section and it still runs fine.
.data?
sinfo SYSTEM_INFO <>
.code
.
.
.
.
invoke GetSystemInfo,ADDR sinfo
invoke dwtoa,sinfo.dwNumberOfProcessors,ADDR buffer1
invoke MessageBox,hWin,ADDR buffer1,
SADD("Processor Count"),MB_OK
What version of MASM32 and windows.inc are you using ?
This is the STRUCT in windows.inc
SYSTEM_INFO STRUCT
wProcessorArchitecture WORD ?
wReserved WORD ?
dwPageSize DWORD ?
lpMinimumApplicationAddress DWORD ?
lpMaximumApplicationAddress DWORD ?
dwActiveProcessorMask DWORD ?
dwNumberOfProcessors DWORD ?
dwProcessorType DWORD ?
dwAllocationGranularity DWORD ?
wProcessorLevel WORD ?
wProcessorRevision WORD ?
SYSTEM_INFO ENDS
Regards,
hutch@movsd.com
Hutch:
The dwNumberOfProcessors in my windows.inc file had an r after the dw...dwr
How it got there is a mystery but i corrected and it works fine.
Maybe somebody hacked my system and put it their knowing that i was going to use that structure.
Maybe it was an alien.
Maybe i am paranoid.
Maybe i should shut up.
Its fixed.
:alright:
The dwNumberOfProcessors in my windows.inc file had an r after the dw...dwr
How it got there is a mystery but i corrected and it works fine.
Maybe somebody hacked my system and put it their knowing that i was going to use that structure.
Maybe it was an alien.
Maybe i am paranoid.
Maybe i should shut up.
Its fixed.
:alright:
I knew it :alright:
I spent once hours to look for an hWnd hwnd error in my Windows.inc... because I blindly trusted the inc file and was convinced it being my fault...
JC
I spent once hours to look for an hWnd hwnd error in my Windows.inc... because I blindly trusted the inc file and was convinced it being my fault...
JC