MQL4: How to get Win32_Processor (WMI class) CPU ID under MQL4 ?

 
and Win32_DiskDrive (WMI class) HDD ID


Is it possible and how to ?

 

WINAPI

http://msdn.microsoft.com/en-us/library/aa394373(VS.85).aspx

http://msdn.microsoft.com/en-us/library/aa394132(VS.85).aspx

 
qjol:

WINAPI

http://msdn.microsoft.com/en-us/library/aa394373(VS.85).aspx

http://msdn.microsoft.com/en-us/library/aa394132(VS.85).aspx


but how to connect above informations with MQL4?
 
puncher:

but how to connect above informations with MQL4?
Try this
 
WHRoeder:
Try this

I'd very much like you and qjol to explain how you make WMI calls from MQ4 using "WINAPI" calls when Microsoft's documentation only talks about a COM interface.

@puncher: I can't see any way of using WMI from MQ4 without something sitting in the middle such as a DLL, or a .vbs script file which you run from MQ4 and then collect values from.

Also @puncher, you can't reliably get the ID of a processor. The ProcessorId in Win32_Processor identifies the processor family, not the specific processor, and the UniqueId is almost always blank. And you need to use Win32_PhysicalMedia to get a disk serial number, not Win32_DiskDrive. Because Win32_DiskDrive does not have a SerialNumber field when called on Windows XP or Windows Server 2003.

And, finally, also @puncher: if you are planning some sort of licensing system using these details, all someone has to do is decompile your EX4 file and then remove whatever parts of it are using WMI to check the hardware.