mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 00:29:07 +02:00
* win/sysutils.pp: removed private WinAPI function declarations. Since this unit uses Windows unit, there's no point in re-declaring stuff.
git-svn-id: trunk@16292 -
This commit is contained in:
parent
d8eccf008d
commit
a4dd7701d9
@ -156,15 +156,10 @@ function ConvertEraString(Count ,Year,Month,Day : integer) : string; forward;
|
|||||||
{ Include platform independent implementation part }
|
{ Include platform independent implementation part }
|
||||||
{$i sysutils.inc}
|
{$i sysutils.inc}
|
||||||
|
|
||||||
function SysGetTempFileName(lpPathName:LPCSTR;
|
|
||||||
lpPrefixString:LPCSTR;
|
|
||||||
uUnique:UINT;
|
|
||||||
lpTempFileName:LPSTR):UINT;stdcall;external 'kernel32' name 'GetTempFileNameA';
|
|
||||||
|
|
||||||
function GetTempFileName(Dir,Prefix: PChar; uUnique: DWORD; TempFileName: PChar):DWORD;
|
function GetTempFileName(Dir,Prefix: PChar; uUnique: DWORD; TempFileName: PChar):DWORD;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result:=SysGetTempFileName(Dir,Prefix,uUnique,TempFileName);
|
Result:= Windows.GetTempFileNameA(Dir,Prefix,uUnique,TempFileName);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -482,9 +477,6 @@ end;
|
|||||||
Disk Functions
|
Disk Functions
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
function GetDiskFreeSpace(drive:pchar;var sector_cluster,bytes_sector,
|
|
||||||
freeclusters,totalclusters:longint):longbool;
|
|
||||||
stdcall;external 'kernel32' name 'GetDiskFreeSpaceA';
|
|
||||||
type
|
type
|
||||||
TGetDiskFreeSpaceEx = function(drive:pchar;var availableforcaller,total,free):longbool;stdcall;
|
TGetDiskFreeSpaceEx = function(drive:pchar;var availableforcaller,total,free):longbool;stdcall;
|
||||||
|
|
||||||
@ -495,7 +487,7 @@ function diskfree(drive : byte) : int64;
|
|||||||
var
|
var
|
||||||
disk : array[1..4] of char;
|
disk : array[1..4] of char;
|
||||||
secs,bytes,
|
secs,bytes,
|
||||||
free,total : longint;
|
free,total : dword;
|
||||||
qwtotal,qwfree,qwcaller : int64;
|
qwtotal,qwfree,qwcaller : int64;
|
||||||
begin
|
begin
|
||||||
if drive=0 then
|
if drive=0 then
|
||||||
@ -531,7 +523,7 @@ function disksize(drive : byte) : int64;
|
|||||||
var
|
var
|
||||||
disk : array[1..4] of char;
|
disk : array[1..4] of char;
|
||||||
secs,bytes,
|
secs,bytes,
|
||||||
free,total : longint;
|
free,total : dword;
|
||||||
qwtotal,qwfree,qwcaller : int64;
|
qwtotal,qwfree,qwcaller : int64;
|
||||||
begin
|
begin
|
||||||
if drive=0 then
|
if drive=0 then
|
||||||
@ -887,14 +879,6 @@ end;
|
|||||||
Target Dependent
|
Target Dependent
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
function FormatMessageA(dwFlags : DWORD;
|
|
||||||
lpSource : Pointer;
|
|
||||||
dwMessageId : DWORD;
|
|
||||||
dwLanguageId: DWORD;
|
|
||||||
lpBuffer : PCHAR;
|
|
||||||
nSize : DWORD;
|
|
||||||
Arguments : Pointer): DWORD; stdcall;external 'kernel32' name 'FormatMessageA';
|
|
||||||
|
|
||||||
function SysErrorMessage(ErrorCode: Integer): String;
|
function SysErrorMessage(ErrorCode: Integer): String;
|
||||||
const
|
const
|
||||||
MaxMsgSize = Format_Message_Max_Width_Mask;
|
MaxMsgSize = Format_Message_Max_Width_Mask;
|
||||||
@ -1097,16 +1081,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function FreeLibrary(hLibModule : THANDLE) : longbool;
|
|
||||||
stdcall;external 'kernel32' name 'FreeLibrary';
|
|
||||||
function GetVersionEx(var VersionInformation:TOSVERSIONINFO) : longbool;
|
|
||||||
stdcall;external 'kernel32' name 'GetVersionExA';
|
|
||||||
function LoadLibrary(lpLibFileName : pchar):THandle;
|
|
||||||
stdcall;external 'kernel32' name 'LoadLibraryA';
|
|
||||||
function GetProcAddress(hModule : THandle;lpProcName : pchar) : pointer;
|
|
||||||
stdcall;external 'kernel32' name 'GetProcAddress';
|
|
||||||
|
|
||||||
Const
|
Const
|
||||||
CSIDL_PROGRAMS = $0002; { %SYSTEMDRIVE%\Program Files }
|
CSIDL_PROGRAMS = $0002; { %SYSTEMDRIVE%\Program Files }
|
||||||
CSIDL_PERSONAL = $0005; { %USERPROFILE%\My Documents }
|
CSIDL_PERSONAL = $0005; { %USERPROFILE%\My Documents }
|
||||||
|
Loading…
Reference in New Issue
Block a user