Mq4 Protection methods.. - page 3

 
kum01049:

reading registry not so help full

/ / + ----------------------------------------------- ------------------- +


/ / | Readreg.mq4 | 
/ / + -------------------- ---------------------------------------------- + 
# property  copyright  " "
# Property  Link       "  "
 
//————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————— 
// LIBRARY WORK WITH РЕЕСТРОМ 
//————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————— 
#import  " advapi32.dll "
    int  RegOpenKeyA ( int  hkey , string  lpSubKey , int  phkResult []) ;
     int  RegCloseKey ( int  hkey ) ;
     int  RegQueryValueExA ( int  hkey , string  lpValueName , int  lpReserved , int  lpType [] , string  lpData , int  lpcbData []) ;
     int  RegSetValueExA ( int  hkey , string  lpValueName , int  Reserved , int  dwType , string  lpData , int  cbData ) ;

since B600 > strings are UNICUDE you have to adapt the code for instance RegOpenKeyW and not RegOpenKeyA
 
https://www.mql5.com/en/articles/1572
 
How about hard code a hash of the file and then code it to check that at runtime.
[Deleted]  
SDC:
How about hard code a hash of the file and then code it to check that at runtime.
it will put down the system,any samples?
[Deleted]  

Those are outdated!
 
Then, you need to ask someone code it for you.
 
if you are interested, I can do it
 
ozod0309:
if you are interested, I can do it
Then do it and post the result here. Advertising is not allowed on this forum.
 
kum01049:
#import "Kernel32.dll"
bool GetVolumeInformationA(string RootPathName,
string VolumeNameBuffer, int VolumeNameSize,
int& VolumeSerialNumber[], int MaximumComponentLength,
int FileSystemFlags, string FileSystemNameBuffer,
int FileSystemNameSize);
#import
//+------------------------------------------------------------------+*/
string SystemDriveSerialNumber(string sDrive) {
int iVolumeSerialNumber[1]={0};
string sVolumeSerialNumber="Lxxxx";
if(GetVolumeInformationA(sDrive+":\\", " ", 15, iVolumeSerialNumber, 0, 0, " ", 15))
{
sVolumeSerialNumber=IntegerToHexString(iVolumeSerialNumber[0]);
sVolumeSerialNumber=StringConcatenate(StringSubstr(sVolumeSerialNumber,0,4), "-", StringSubstr(sVolumeSerialNumber,4));
}
return(sVolumeSerialNumber);

this is not working


GetVolumeInformationA =============> GetVolumeInformationW

 

you are welcome  :)  

[Deleted]  
appleparty:

GetVolumeInformationA =============> GetVolumeInformationW

 

you are welcome  :)  

Unless you do not mind that this function returns zero on every Mac.