Generic Class Library - bugs, description, questions, usage and suggestions - page 33

 
JRandomTrader:

Well, actually, "Wine (originally an acronym for "Wine Is Not an Emulator")" :)

I've got a fully operational MT running not only under wine, but also in a virtual machine.

I know what wine is. I used linux and wine at work for many years ("when it wasn't a trend yet"). I made love to MT under wine for a long time. I understand that current and properly configured versions work "well enough". But I'm tired of wasting precious time on unnecessary rakes. I'm all for a native linux application. And since there isn't one and won't be one, I'm using W7 and the hated W10.

 
What's wrong with being tied to a trading account?
One or more...
 
Aliaksandr Hryshyn:
What's not to like about binding to a trading account?
One or more...

Yes, I also attach my name to an account myself (for my own use). But here it is probably necessary to give someone an expert without the right of transfer, but with the possibility to use any accounts in your own place.


 

I wrote the code for the task at hand today. I'll probably do it tomorrow. It goes something like this (the data from HWiNFO matches):

System Management BIOS Version: 2.7

System BIOS Version: 15.28

Embedded Controller Firmware Version: 16.90

BIOS Vendor: Hewlett-Packard

BIOS Version: F.1 C

BIOS Release Date: 01/23/2013

UUID: {31334333-4139-3038-3331-453031314531}

System Manufacturer: Hewlett-Packard

Product Name: HP Pavilion dv6 Notebook PC

Product Version: 0691210000204610000620100

Product Serial Number: 2 CE1520FWM

SKU Number: A7N65EA#ACB

 Family: 103 C_5335KV G=N L=CON B=HP S=PAV        

Mainboard Manufacturer: Hewlett-Packard

Mainboard Name: 17 FA

Mainboard Version: 10.5 A

Mainboard Serial Number: PCKYU2B2E1Z32H

Asset Tag: Base Board Asset Tag

Location in chassis: Base Board Chassis Location
The UUID, notebook serial number and motherboard serial number are suitable for binding.
 
Edgar Akhmadeev:

Yes, I also attach my own name to an account (for my own use). But here it is probably necessary to give someone an expert without the right of transfer, but with the possibility of using any accounts for oneself.


I have it like this:

#define  EXT

#ifndef  EXT
   sinput double Lot=1.0;
   sinput bool REAL=false;
#else
   #include "symbol.txt"
   #include "account.txt"

   #ifndef  ACCOUNT
      #define  ACCOUNT 0
      #define  TEST
   #endif
   #ifndef  SYMBOL
      #define  TEST
   #endif

   #ifdef  TEST
      double Lot=1.0;
      bool REAL=false;
   #else
      sinput double Lot=1.0;
      bool REAL=true;
   #endif

#endif
 
Aliaksandr Hryshyn:
What's not to like about binding to a trading account?
One or more...

It's very long and frustrating.

I'm not the only one who changes trading accounts once a week, and when there are multiple users, half a day is all you do is enter new accounts and compile. That said, it's not immediate and someone will have to wait.

Otherwise, you give the program to the hardware and forget it.

 
Получение информации из SMBIOS
Получение информации из SMBIOS
  • 2021.03.23
  • www.mql5.com
Написал код для чтения информации о железе (материнская плата и платформа) из SMBIOS. Используется, естественно, WinAPI. SMBIOS...
 
Vitaly Muzichenko:

Who can tell me if it is possible to run this code in Metatrader?

---

Is there any other way to get the Motherboard SerialNumber?

If you still need it, it's possible:

#define _WIN64  // Only for a 64-bit terminal!

#include <WbemCli.mqh>

//+-----------------------------------------------------------------------------------------------+
//| Script program start function                                                                 |
//+-----------------------------------------------------------------------------------------------+
void OnStart()
{
   HRESULT result = CoInitialize( 0 );
   if( result == S_OK ){
      lpWbemLocator pLoc;
      result = CoCreateInstance( CLSID_WbemLocator, 0, CLSCTX_INPROC_SERVER, IID_IWbemLocator, pLoc.mInterface );
      if( result == S_OK ){
         lpWbemServices pSvc;
         result = pLoc.ConnectServer( "root\\CimV2", "", "", "", pSvc );
         if( result == S_OK ){
            result = CoSetProxyBlanket( pSvc.mInterface, RPC_C_AUTHN_WINNT, RPC_C_AUTHZ_NONE, 0, RPC_C_AUTHN_LEVEL_CALL, RPC_C_IMP_LEVEL_IMPERSONATE, 0, EOAC_NONE );
            if( result == S_OK ){
               lpEnumWbemClassObject pEnumerator;
               // Получаем серийный номер материнской платы.
               Print( ">>>  Серийный номер материнской платы  <<<" );
               result = pSvc.ExecQuery( "SELECT * FROM Win32_BaseBoard", pEnumerator );
               if( result == S_OK ){
                  uint uReturn = 0;
                  while( result == S_OK ){
                     lpWbemClassObject pclsObj;
                     result = pEnumerator.Next( pclsObj, uReturn );
                     if( uReturn == 0 )
                        break;
                     Variant vtProp;
                     result = pclsObj.Get( "SerialNumber", vtProp );
                     if( result == S_OK ){
                        Print( "SerialNumber", ": ", vtProp.toString() );
                     }
                     pclsObj.Release();
                  }
               }
            }
            pSvc.Release();
         }
         pLoc.Release();
      }
      CoUninitialize();
   }
}
//+-----------------------------------------------------------------------------------------------+

Get the libraryhere

Works in both MT4 and MT5.
Files:
WbemCli.mqh  11 kb
WMITest.mq5  17 kb
 
Koldun Zloy:

If you still need it, it's possible:

Get the libraryhere

Thank you!

Already made code that works in mt4 and mt5

Получение информации из SMBIOS
Получение информации из SMBIOS
  • 2021.03.23
  • www.mql5.com
Написал код для чтения информации о железе (материнская плата и платформа) из SMBIOS. Используется, естественно, WinAPI...
 
As our comrade Mao said: Let a hundred colours bloom.
I wonder if the uuid matches?
Reason: