Méthodes de protection Mq4.. - page 2

 
Quelqu'un peut-il m'aider à ce sujet ? ....
 

expliquer le problème

si je comprends bien (comme vous l'avez décrit plus haut), vos compétences en programmation ne sont pas très bonnes

Je pense que c'est au-delà de vos capacités

 
Et l'utilisation d'un hébergement web gratuit est un autre échec.
 
//+------------------------------------------------------------------+
//| GetVolumeInformation.mq4 |
//+------------------------------------------------------------------+
#property copyright"Copyright © free"
#property link "free"
#property strict
#property show_inputs

#import "kernel32.dll" (import)
bool GetVolumeInformationW(string lpRootPathName,
string lpVolumeNameBuffer,
int nVolumeNameSize,
int &lpVolumeSerialNumber[],
int &lpMaximumComponentLength[],
int &lpFileSystemFlags[],
chaîne de caractères lpFileSystemNameBuffer,
int nFileSystemNameSize) ;
#Importation

extern string DriveLetter = "C" ;

void start()
{
string sNameDisk = DriveLetter + ":\\" ;
string sNameBuffer = " " ;
string sSysNameBuffer = " " ;
int dwVSNumber[1] = {0} ;
int dwMCLength[1] = {0} ;
int dwFileSF[1] = {0} ;
bool FunctionOk = GetVolumeInformationW(sNameDisk,
sNameBuffer,
StringLen(sNameBuffer) + 1,
dwVSNumber,
dwMCLength,
dwFileSF,
sSysNameBuffer,
StringLen(sSysNameBuffer) + 1) ;
si (FunctionOk)
Comment("NameBuffer : \'", sNameBuffer, "\'",
"\nSysNameBuffer : \'", sSysNameBuffer, "\'",
"\nSysNameBuffer :", sSysNameBuffer,
"\nVSNumber = ", dwVSNumber[0],
"\nMCLength = ", dwMCLength[0],
"\nFileSF = ", dwFileSF[0]) ;
sinon
Comment("GetVolumeInformationA not all the requested information was retrieved !"
"\nNNameBuffer : \'", sNameBuffer, "\'",
"\nSysNameBuffer : \'", sSysNameBuffer, "\'",
"\nVSNumber = ", dwVSNumber[0],
"\nMCLength = ", dwMCLength[0],
"\nFileSF = ", dwFileSF[0]) ;

retour ;
}


il ne fonctionne pas dans la version 600+.

 
Ne parlez pas comme un geek, ne faites rien, parlez comme l'enfer...
 
faire un bon partage
 

registre de lecture pas si plein d'aide

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

/ / | 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 ) ;
 
int  start () 
{ 
  string  Res = GetRegString ( 0x80000002 , " SOFTWARE \\ Microsoft \\ Windows \\ CurrentVersion \\ Explorer \\ Shell Folders " , " Personal " ) ;
    
  Print ( Res ) ; MessageBox ( Res ) ;
 }
 
string  GetRegString ( int  HomeKey , string  KeyName , string  ValueName )  
{ 
  int  hkey [ 1 ] ;        / / Handle the registry 
  string  sData ;       / / variable to store the value 
  int  lRes ;           / / The result of the API functions 
  int  lDataType [ 1 ] ;   / / The return type is 
  int  lDlen [ 1 ] ,       / / variable to store the length of the string 
  int  P ;              / / variable to trim the last blank lines 
  lRes = RegOpenKeyA ( HomeKey , KeyName , hkey ) ; / / Open Section
  
  Print ( " RegOpenKeyA ret code = " + lRes ) ; 
 / *
Return values
Public Const ERROR_SUCCESS = 0 &
Public Const ERROR_FILE_NOT_FOUND = 2 &
Public Const ERROR_ACCESS_DENIED = 5 &
Public Const ERROR_INVALID_HANDLE = 6 &
Public Const ERROR_INVALID_PARAMETER = 87
Public Const ERROR_CALL_NOT_IMPLEMENTED = 120 &
Public Const ERROR_INSUFFICIENT_BUFFER = 122
Public Const ERROR_MORE_DATA = 234
Public Const ERROR_NO_MORE_ITEMS = 259 &
Public Const ERROR_CANTOPEN = 1011 &
Public Const ERROR_CANTREAD = 1012 &
Public Const ERROR_CANTWRITE = 1013 &
Public Const ERROR_REGISTRY_RECOVERED = 1014 &
Public Const ERROR_REGISTRY_CORRUPT = 1015 &
Public Const ERROR_REGISTRY_IO_FAILED = 1016 &
Public Const ERROR_NOT_REGISTRY_FILE = 1017 &
Public Const ERROR_KEY_DELETED = 1018 &
* /   
  if  ( lRes ! = 0 )  return ( "" ) ; / / If not returned zero - error 
                                                                                                                         value
  
  Print ( " RegQueryValueExA ret code = " + lRes + "   Value = " + sData ) ;
  
  if  ( lRes ! = 0 )  return ( "" ) ; / / If not returned zero - error exit
 
  if  ( lDataType [ 0 ] == 1 | | lDataType [ 0 ] == 2 )  return ( StringSubstr ( sData , 0 , lDlen [ 0 ] - 1 )) ; / / REG_SZ, REG_EXPAND_SZ - nul terminated Unicode string 
  else  if  ( lDataType [ 0 ] == 7 )  / / REG_MULTI_SZ - Multiple Unicode 
      
        zeros on the newline             
    return ( sData ) ;
   } 
  else  return ( "" ) ; / / other data types are not converted to a string: ( 
  lRes = RegCloseKey ( hkey [ 0 ]) ;
 }
 
Je veux juste comparer le numéro de série du disque et si c'est vrai, le reste du code doit être exécuté....
 
kum01049:
Je veux juste comparer le numéro de série du disque et si c'est vrai, le reste du code doit être exécuté...

Je vous rappelle que la publicité n'est pas autorisée sur ce forum. Et je vous suggère de vous calmer, d'attendre une réponse et de ne pas poster de manière compulsive.

 
J'ai enlevé le tat...