If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
System Info From Win32API
8 posts
• Page 1 of 1
System Info From Win32API
Hey guys, Im trying to figure out this code I found which returns system info (OEM ID, ect).
Now I only want to get some piece of data which could be used to link a machine to a FS app.
Here's the C++ code:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724423%28v=vs.85%29.aspx
I would appreciate any help as I have no C++ modules installed in my brain so far. Some things concern me, like "#pragma comment(lib, "user32.lib")" . . .
And the simple GetSystemInfo(&siSysInfo);
But like I said, I have no idea what im doing here! Anyone understand this?
Thanks
Now I only want to get some piece of data which could be used to link a machine to a FS app.
Here's the C++ code:
- Code: Select all
include <windows.h>
#include <stdio.h>
#pragma comment(lib, "user32.lib")
void main()
{
SYSTEM_INFO siSysInfo;
// Copy the hardware information to the SYSTEM_INFO structure.
GetSystemInfo(&siSysInfo);
// Display the contents of the SYSTEM_INFO structure.
printf("Hardware information: \n");
printf(" OEM ID: %u\n", siSysInfo.dwOemId);
printf(" Number of processors: %u\n",
siSysInfo.dwNumberOfProcessors);
printf(" Page size: %u\n", siSysInfo.dwPageSize);
printf(" Processor type: %u\n", siSysInfo.dwProcessorType);
printf(" Minimum application address: %lx\n",
siSysInfo.lpMinimumApplicationAddress);
printf(" Maximum application address: %lx\n",
siSysInfo.lpMaximumApplicationAddress);
printf(" Active processor mask: %u\n",
siSysInfo.dwActiveProcessorMask);
}
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724423%28v=vs.85%29.aspx
I would appreciate any help as I have no C++ modules installed in my brain so far. Some things concern me, like "#pragma comment(lib, "user32.lib")" . . .
And the simple GetSystemInfo(&siSysInfo);
But like I said, I have no idea what im doing here! Anyone understand this?
Thanks
- Drnkhobo
- Posts: 312
- Joined: Sun Aug 19, 2012 7:13 pm
- Location: ZA
Re: System Info From Win32API
hello guys,
I coded a dll in C + + with the function that you cited in your post that operates under FS
for pragma (that am under visual or Codeblocks) it is now useless.
and this procedure "GetSystemInfo (& siSysInfo)" is used to insert data into siSysInfo for future use
join if I post my example use this info
coded under codeblocks .
I coded a dll in C + + with the function that you cited in your post that operates under FS
for pragma (that am under visual or Codeblocks) it is now useless.
and this procedure "GetSystemInfo (& siSysInfo)" is used to insert data into siSysInfo for future use
join if I post my example use this info
coded under codeblocks .
- DjMmix
- Posts: 16
- Joined: Wed Nov 09, 2011 8:02 am
- Location: france
Re: System Info From Win32API
Tronic, DjMmix - many thanks, this is just the kind of stuff I need to see to get my C++ good enough to do something useful!
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: System Info From Win32API
is always nice to be able to help.
I can add a tip about the creation and management of new windows or other interactions,
you should always create them in a new thread.
I can add a tip about the creation and management of new windows or other interactions,
you should always create them in a new thread.
- Tronic
- Posts: 539
- Joined: Wed Dec 21, 2011 12:59 pm
Re: System Info From Win32API
Hats off to you guys!
Damn!
Really nice work there DjMmix!
- Drnkhobo
- Posts: 312
- Joined: Sun Aug 19, 2012 7:13 pm
- Location: ZA
Re: System Info From Win32API
I opened the ZIP and saw several files in there ... What are we suppose to do with these files ? Does the DLL need to be dropped somewhere ?
I've not tried running the .fsm file until I was sure what to do.
Thanks for any clarification!
I've not tried running the .fsm file until I was sure what to do.
Thanks for any clarification!
- RJHollins
- Posts: 1571
- Joined: Thu Mar 08, 2012 7:58 pm
Re: System Info From Win32API
hello guys, thank you for the encouragement
@ RJHollins: in the zip there is the dll concern the FSM and the rest of the files are the files for the "code::blocks" with which I created the dll project, but if you codeblocks or visual studio you can viewed project written in C + + to see how I did it;)
@ RJHollins: in the zip there is the dll concern the FSM and the rest of the files are the files for the "code::blocks" with which I created the dll project, but if you codeblocks or visual studio you can viewed project written in C + + to see how I did it;)
- DjMmix
- Posts: 16
- Joined: Wed Nov 09, 2011 8:02 am
- Location: france
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: Google [Bot] and 110 guests