BOOL GetVolumeInformation( LPCTSTR lpRootPathName, // address of root directory of the file system LPTSTR lpVolumeNameBuffer, // address of name of the volume DWORD nVolumeNameSize, // length of lpVolumeNameBuffer LPDWORD lpVolumeSerialNumber, // address of volume serial number LPDWORD lpMaximumComponentLength, // address of system's maximum filename length LPDWORD lpFileSystemFlags, // address of file system flags LPTSTR lpFileSystemNameBuffer, // address of name of file system DWORD nFileSystemNameSize // length of lpFileSystemNameBuffer );
Код (Text): #include <windows.h> int main(int argc, char* argv[]) { char buff[1024]; GetVolumeInformation("C:\\", buff, sizeof(buff)/sizeof(char), 0, 0, 0, 0, 0); printf("%s", buff); Sleep(5000); return 0; } Пашет. На асме же на GetVolumeInformation падает =\ Код (Text): .386 .model flat, stdcall option casemap :none ; case sensitive include \masm32\include\windows.inc include \masm32\include\gdi32.inc include \masm32\include\user32.inc include \masm32\include\kernel32.inc includelib \masm32\lib\gdi32.lib includelib \masm32\lib\user32.lib includelib \masm32\lib\kernel32.lib .data disk db "C:\\", 0 .data? buff db 1000h dup (?) .code start: ;GetVolumeInformation("C:\\", buff, sizeof(buff)/sizeof(char), 0, 0, 0, 0, 0); invoke GetVolumeInformation, offset disk, offset buff, 1000h, 0, 0, 0, 0, 0 ;printf("%s", buff); ;Sleep(5000); end start