磁盤和驅動管理(1)
基本函數:
(1) GetLogicalDrives( void )
(2) DWORD GetLogicalDriveString( DWORD nBufferLength, LPTSTR lpBuffer );
(3) HANDLE FindFirstVolume( LPTSTR lpszVolumeName, DWORD ccBufferLength );
(4) BOOL FindNextVolume( HANDLE hFindVolume, LPTSTR lpszVolumeName, DWORD cchBufferLength );
(5) BOOL WINAPI FindVolumeClose( HANDLE hFindVolume );
(6) UINT GetDriveType( LPCTSTR lpRootPathName );
(7) BOOL GetVolumeInformation(
LPCTSTR lpRootPathName,
LPTSTR lpVolumeNameBuffer,
DWORD nVolumeNamesize,
LPDWORD lpVolumeSerialNumber,
LPDWORD lpMaximumComponentLength,
LPDWORD lpFileSystemFlags,
LPTSTR lpFileSystemNameBuffer,
DWORD nFileSystemNameSize
);
附加:
#include <windows.h>
#pragma comment( lib, "user32.lib" )
int WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow )
{
MessageBox( NULL, TEXT( "start learning windows api" ), TEXT( "message dialog Box" ), MB_OK );
return 0;
}
MessageBox函數原型:
int MessageBox( HWND hWnd, LPCTSTR lpText, LPCTSTR lpCaption, UINT uType );