mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-05 19:10:15 +02:00
* use dynlibs and -A versions
git-svn-id: trunk@24688 -
This commit is contained in:
parent
5aab0da8ae
commit
e0c3353fa0
@ -164,7 +164,7 @@ begin
|
||||
if (CDOSVer>4) then
|
||||
Flags:=Flags or Cardinal(GENERIC_WRITE);
|
||||
Device:=Upcase('\\.\'+Device);
|
||||
DriveHandle:=CreateFile(pchar(Device),Flags,FILE_SHARE_READ,
|
||||
DriveHandle:=CreateFileA(pchar(Device),Flags,FILE_SHARE_READ,
|
||||
nil,OPEN_EXISTING, 0, 0 );
|
||||
if (DriveHandle=INVALID_HANDLE_VALUE) then
|
||||
begin
|
||||
@ -336,7 +336,7 @@ Var
|
||||
begin
|
||||
Flags:=Cardinal(GENERIC_READ);
|
||||
device:=Upcase('\\.\'+device);
|
||||
DriveHandle:=CreateFile(PChar(Device), Flags,
|
||||
DriveHandle:=CreateFileA(PChar(Device), Flags,
|
||||
FILE_SHARE_READ, nil, OPEN_EXISTING, 0, 0 );
|
||||
if (DriveHandle = INVALID_HANDLE_VALUE) then
|
||||
begin
|
||||
@ -375,12 +375,12 @@ var
|
||||
|
||||
begin
|
||||
FillChar(Drives,SizeOf(Drives),0);
|
||||
GetLogicalDriveStrings(105,Drives);
|
||||
GetLogicalDriveStringsA(105,Drives);
|
||||
P:=@Drives[0];
|
||||
Result:=0;
|
||||
While P[0]<>#0 do
|
||||
begin
|
||||
If GetDriveType(p)=DRIVE_CDROM then
|
||||
If GetDriveTypeA(p)=DRIVE_CDROM then
|
||||
begin
|
||||
If CopyDrives and (Result<High(CDDrives)) then
|
||||
CDDrives[Result]:=Upcase(P[0])+':';
|
||||
|
@ -218,9 +218,11 @@ procedure UnloadASPI;
|
||||
|
||||
implementation
|
||||
|
||||
uses dynlibs;
|
||||
|
||||
const
|
||||
HWNASPI : THandle = 0;
|
||||
WNASPI : pchar = 'wnaspi32.dll';
|
||||
HWNASPI : TLibHandle = 0;
|
||||
WNASPI = 'wnaspi32.dll';
|
||||
|
||||
Function ASPILoaded : Boolean;
|
||||
|
||||
@ -245,7 +247,7 @@ begin
|
||||
if (HWNASPI<>0) then
|
||||
begin
|
||||
FreeLibrary(HWNASPI);
|
||||
HWNASPI:=0;
|
||||
HWNASPI:=TLibHandle(0);
|
||||
SendASPI32Command:=nil;
|
||||
GetASPI32SupportInfo:=nil;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user