Check_Virtual_CD_Drive.dpr
上传用户:lnzz01
上传日期:2013-05-23
资源大小:130k
文件大小:1k
- // 2001.6.25 Yan.j.f
- program Check_Virtual_CD_Drive;
- uses
- windows;
- var
- strMsg: string;
- hVdisk: HFILE;
- {$R *.RES}
- begin
- if ((GetVersion() and $80000000) = 0) then
- begin
- MessageBox (0, 'Error OS version, only Win9x', 'check', MB_OK);
- exit;
- end;
- strMsg := '安装的虚拟光驱为:'+ chr(13)+chr(10);
- hVdisk := CreateFile ('\.VIRLDISK', 0 , 0 , nil, OPEN_EXISTING,
- FILE_FLAG_DELETE_ON_CLOSE, 0 );
- if ( hVdisk <> INVALID_HANDLE_VALUE ) then
- begin
- CloseHandle ( hVdisk );
- MessageBox ( 0, 'Thanks for use Virldisk, enjoy in this',
- 'check', MB_OK+MB_ICONINFORMATION );
- end;
- hVdisk := CreateFile ('\.cda', 0 , 0 , nil, OPEN_EXISTING,
- FILE_FLAG_DELETE_ON_CLOSE, 0 );
- if ( hVdisk <> INVALID_HANDLE_VALUE ) then
- begin
- CloseHandle ( hVdisk );
- strMsg := strMsg + 'Farstone的虚拟光驱' + chr(13) + chr(10);
- end;
- hVdisk := CreateFile ('\.vcdrom', 0 , 0 , nil, OPEN_EXISTING,
- FILE_FLAG_DELETE_ON_CLOSE, 0 );
- if ( hVdisk <> INVALID_HANDLE_VALUE ) then
- begin
- CloseHandle ( hVdisk );
- strMsg := strMsg + 'CD copier Gamer''s Edition 虚拟光驱' + chr(13) + chr(10);
- end;
- if ( Length(strMsg) < 24 ) then
- strMsg := strMsg + ' 不知道。';
-
- MessageBox ( 0, PChar(strMsg), 'check', MB_OK+MB_ICONINFORMATION );
- end.