Support

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

For general discussion related FlowStone

System Info From Win32API

Postby Drnkhobo » Thu Jan 23, 2014 9:24 am

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:

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? :roll:

Thanks :lol:
Drnkhobo
 
Posts: 312
Joined: Sun Aug 19, 2012 7:13 pm
Location: ZA

Re: System Info From Win32API

Postby Tronic » Thu Jan 23, 2014 10:45 am

Tronic
 
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm

Re: System Info From Win32API

Postby DjMmix » Thu Jan 23, 2014 7:09 pm

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 :)

sysinfoforfs.zip
Project,DLL et FSM
(17.42 KiB) Downloaded 805 times


coded under codeblocks .
DjMmix
 
Posts: 16
Joined: Wed Nov 09, 2011 8:02 am
Location: france

Re: System Info From Win32API

Postby trogluddite » Thu Jan 23, 2014 11:01 pm

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!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: System Info From Win32API

Postby Tronic » Fri Jan 24, 2014 5:23 am

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.
Tronic
 
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm

Re: System Info From Win32API

Postby Drnkhobo » Fri Jan 24, 2014 8:52 am

:o

Hats off to you guys!

Damn!

Really nice work there DjMmix! :lol:
Drnkhobo
 
Posts: 312
Joined: Sun Aug 19, 2012 7:13 pm
Location: ZA

Re: System Info From Win32API

Postby RJHollins » Fri Jan 24, 2014 9:52 am

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!
RJHollins
 
Posts: 1568
Joined: Thu Mar 08, 2012 7:58 pm

Re: System Info From Win32API

Postby DjMmix » Fri Jan 24, 2014 10:55 am

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;)
DjMmix
 
Posts: 16
Joined: Wed Nov 09, 2011 8:02 am
Location: france


Return to General

Who is online

Users browsing this forum: No registered users and 12 guests