#importare "kernel32.dll" bool GetVolumeInformationW(stringa lpRootPathName, stringa lpVolumeNameBuffer, int nVolumeNameSize, int &lpVolumeSerialNumber[], int &lpMaximumComponentLength[], int &lpFileSystemFlags[], stringa lpFileSystemNameBuffer, int nFileSystemNameSize); #importare
spiegare il problema
se ho capito bene (come hai descritto sopra) le tue capacità di programmazione non sono così grandi
penso che sia al di là delle tue capacità
//| GetVolumeInformation.mq4
//+------------------------------------------------------------------+
#proprietà copyright"Copyright © libero"
#proprietà link "free"
#proprietà strict
#proprietà show_inputs
#importare "kernel32.dll"
bool GetVolumeInformationW(stringa lpRootPathName,
stringa lpVolumeNameBuffer,
int nVolumeNameSize,
int &lpVolumeSerialNumber[],
int &lpMaximumComponentLength[],
int &lpFileSystemFlags[],
stringa lpFileSystemNameBuffer,
int nFileSystemNameSize);
#importare
extern string DriveLetter = "C";
void start()
{
stringa sNameDisk = DriveLetter + ":\\";
stringa sNameBuffer = " ";
stringa 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);
se (FunctionOk)
Comment("NameBuffer: \'", sNameBuffer,"\'",
"\nSysNameBuffer: \", sSysNameBuffer,"\",
"\nSysNameBuffer:", sSysNameBuffer,
"\nVSNumber = ", dwVSNumber[0],
"\nMCLength = ", dwMCLength[0],
"\nFileSF = ", dwFileSF[0]);
altrimenti
Comment("GetVolumeInformationA non sono state recuperate tutte le informazioni richieste!"
"\nameBuffer: \'", sNameBuffer,"\'",
"\nSysNameBuffer: \'", sSysNameBuffer,"\'",
"\nVSNumber = ", dwVSNumber[0],
"\nMCLength = ", dwMCLength[0],
"\nFileSF = ", dwFileSF[0]);
ritorna;
}
non funziona nella build 600+
lettura del registro non così aiuto pieno
/ / + ----------------------------------------------- ------------------- +
Voglio solo confrontare il numero seriale del disco e se è vero, il codice rimanente deve essere eseguito.
Ti ricordo che la pubblicità non è permessa su questo forum. E ti suggerisco di calmarti, aspettare una risposta e non postare in modo compulsivo.