GetDriveType (Progress 9 Windows XP)

Hello,
I want to search the CD-ROM with Windows-Api, but I receive an error. The Code as following:
PROCEDURE Getdrivetype EXTERNAL "kernel32.dll".
DEF INPUT PARAMETER drive AS CHAR.
DEFINE RETURN PARAMETER intResult AS LONG.
END.
DEF VAR lngTyp As INT.
DEF VAR strLaufwerk As CHAR.
strLaufwerke = "c:\":U.
RUN GetDriveType (strLaufwerke, OUTPUT lngtyp).
MESSAGE lngtyp VIEW-AS ALERT-BOX.
Error: 3260: Could not find the entrypoint <function>. (3260)
Could not find that function in the DLL.
What ist wrong - oder - is there existing a better solution?
Kind regards
Matthias Röttgermann
 
PROCEDURE GetDriveTypeA EXTERNAL "kernel32.dll".
DEF INPUT PARAMETER drive AS CHAR.
DEFINE RETURN PARAMETER intResult AS LONG.
END.
DEF VAR lngTyp As INT.
DEF VAR strLaufwerk As CHAR.
strLaufwerk = "c:\":U.
RUN GetDriveTypeA (strLaufwerk, OUTPUT lngtyp).
MESSAGE lngtyp VIEW-AS ALERT-BOX.

Note I changed your mismatching variable names also.
 
Hello,
can you tell me
wether this function also has to work under Windows 98?
(In my example it does not work)
Best regards Matthias
 
Top