function OnFirstUIBefore( ) <-- 에 아래 내용을 입력해 보세요.
    STRING svString;
    NUMBER nResult;
    LIST   listID;
begin
    // Create a list to hold the removable drive names.
    listID = ListCreate (STRINGLIST);

    // Get cdrom drives with at least 0 bytes free.
    if (GetValidDrivesList (listID, CDROM_DRIVE, 0) < 0) then
        // Report an error; then terminate.
        MessageBox (MSG_ERR, SEVERE);
        abort;
    else
        // Display the list of removable drives.
        //SdShowInfoList (TITLE, MSG_REMOVABLE, listID);
        // Retrieve the first item in the list (1078).
        nResult = ListGetFirstString (listID, svString);

        MessageBox (svString,INFORMATION);
    endif;
end;

SdShowInfoList (TITLE, MSG_REMOVABLE, listID); 이것을 이용하면 CD-ROM을 모두 찾습니다. 저의 경우 F:, I: 가 CD-ROM 인데요 모두 나타나더군요. 그래서 저는 nResult = ListGetFirstString (listID, svString); 을 이용해서 F만 뽑아 냈습니다.

Related Posts

답글 남기기

이메일 주소는 공개되지 않습니다.