unit Unit1;interfaceuses Windows, Messages, SysUtils, //只要你看到有这个Windows,就行了。
这是从Windows单元摘下来的DLL函数申明: function GetThreadTimes; external kernel32 name 'GetThreadTimes'; function GetTickCount; external kernel32 name 'GetTickCount'; function GetTimeFormat; external kernel32 name 'GetTimeFormatA'; function GetTimeFormatA; external kernel32 name 'GetTimeFormatA'; function GetTimeFormatW; external kernel32 name 'GetTimeFormatW'; function GetTimeZoneInformation; external kernel32 name 'GetTimeZoneInformation'; function GetUserDefaultLCID; external kernel32 name 'GetUserDefaultLCID'; function GetUserDefaultLangID; external kernel32 name 'GetUserDefaultLangID'; function GetVersion; external kernel32 name 'GetVersion'; function GetVersionEx; external kernel32 name 'GetVersionExA'; function GetVersionExA; external kernel32 name 'GetVersionExA'; function GetVersionExW; external kernel32 name 'GetVersionExW';
RUN的时候,显示找不到HRYN类型
Windows, Messages, SysUtils, //只要你看到有这个Windows,就行了。
function GetThreadTimes; external kernel32 name 'GetThreadTimes';
function GetTickCount; external kernel32 name 'GetTickCount';
function GetTimeFormat; external kernel32 name 'GetTimeFormatA';
function GetTimeFormatA; external kernel32 name 'GetTimeFormatA';
function GetTimeFormatW; external kernel32 name 'GetTimeFormatW';
function GetTimeZoneInformation; external kernel32 name 'GetTimeZoneInformation';
function GetUserDefaultLCID; external kernel32 name 'GetUserDefaultLCID';
function GetUserDefaultLangID; external kernel32 name 'GetUserDefaultLangID';
function GetVersion; external kernel32 name 'GetVersion';
function GetVersionEx; external kernel32 name 'GetVersionExA';
function GetVersionExA; external kernel32 name 'GetVersionExA';
function GetVersionExW; external kernel32 name 'GetVersionExW';
未公开的就难说了!
没有的当然就要申明
所以说“聪明的程序员用Delphi”嘛。:)
kernel32. user32. 和 GDI32 (好像是这三个)
的绝大多数(99%)API均申明啦!