摘要: //声明: GetCurrentPositionEx( DC: HDC; {设备场景句柄} Point: PPoint {点指针} ): BOOL; //举例: var pt: TPoint; begin GetCurrentPositionEx(Canvas.Handle, @pt); ShowMessage(Format('%d,%d',[pt.X,pt.Y... 阅读全文
posted @ 2008-02-11 22:16 万一 阅读(2355) 评论(0) 推荐(0)
摘要: //声明: GetLogicalDriveStrings( nBufferLength: DWORD; {缓冲区大小} lpBuffer: PAnsiChar {缓冲区} ): DWORD; //缓冲区的结果是这样储存的: 譬如 A 驱动器会表示为 A:\ 后面隔一个空字符, 依次向后; //所以每个驱动器会占 4 字节. //举例: procedure TForm1.Form... 阅读全文
posted @ 2008-02-11 20:11 万一 阅读(5131) 评论(1) 推荐(0)
摘要: const P1: PChar = 'CodeGear'; P2: PChar = 'Delphi'; var S: array[0..15] of Char; begin StrCopy(S, P1); StrCat(S, ' '); StrCat(S, P2); ShowMessage(StrPas(S)); {CodeGear Delphi} ShowMes... 阅读全文
posted @ 2008-02-11 19:39 万一 阅读(8568) 评论(6) 推荐(1)
摘要: //声明: GetLogicalDrives: DWORD; {无参数} //返回值: 返回值的二进制右边第一位为 1 表示驱动器 A: 存在; 返回值的二进制右边第二位为 1 表示驱动器 B: 存在...以次类推. //举例: procedure TForm1.FormCreate(Sender: TObject); var Drives: DWord; i: Integer; b... 阅读全文
posted @ 2008-02-11 17:21 万一 阅读(4231) 评论(1) 推荐(0)
摘要: //声明: GetVolumeInformation( lpRootPathName: PChar; {磁盘驱动器代码字符串} lpVolumeNameBuffer: PChar; {磁盘驱动器卷标名称} nVolumeNameSize: DWORD; {磁盘驱动器卷标名称长度} lpVolumeSeria... 阅读全文
posted @ 2008-02-11 16:26 万一 阅读(15386) 评论(1) 推荐(0)
摘要: //声明: GetDriveType( lpRootPathName: PChar {磁盘根目录} ): UINT; //返回值: DRIVE_UNKNOWN = 0; {未知} DRIVE_NO_ROOT_DIR = 1; {可移动磁盘} DRIVE_REMOVABLE = 2; {软盘} DRIVE_FIXED = 3; {本地硬盘} DRIVE_REMOTE ... 阅读全文
posted @ 2008-02-11 15:33 万一 阅读(10877) 评论(13) 推荐(0)
摘要: //声明: GetDiskFreeSpaceEx( lpDirectoryName: PChar; {磁盘根路径} var lpFreeBytesAvailableToCaller: TLargeInteger; {可用空间} var lpTotalNumberOfBytes: TLargeInteger; {总空间}... 阅读全文
posted @ 2008-02-11 15:14 万一 阅读(5768) 评论(3) 推荐(0)
摘要: //声明: GetDiskFreeSpace( lpRootPathName: PChar; {磁盘根路径} var lpSectorsPerCluster: DWORD; {一个簇内的扇区数} var lpBytesPerSector: DWORD; {一个扇区内的字节数} var lpNumberOfFreeClusters: DWO... 阅读全文
posted @ 2008-02-11 14:55 万一 阅读(6001) 评论(0) 推荐(0)
摘要: //声明: GetKeyboardType( nTypeFlag: Integer {0:键盘类型; 1:键盘子类型; 2:功能键数量} ): Integer; //举例: procedure TForm1.FormCreate(Sender: TObject); var i: Integer; List: TStringList; begin List := TStringL... 阅读全文
posted @ 2008-02-11 10:37 万一 阅读(3177) 评论(0) 推荐(0)
摘要: //声明: GetSystemInfo( var lpSystemInfo: TSystemInfo {} ); //TSystemInfo 是 _SYSTEM_INFO 结构的重定义: _SYSTEM_INFO = record case Integer of 0: ( dwOemId: DWORD); {返回计算机标识符, 已废弃} 1: ( ... 阅读全文
posted @ 2008-02-11 10:11 万一 阅读(6389) 评论(1) 推荐(1)
摘要: //声明: CopyFile( lpExistingFileName: PChar; {源文件} lpNewFileName: PChar; {目标文件} bFailIfExists: BOOL {如果目标文件存在, True: 失败; False: 覆盖} ): BOOL; //例1: begin CopyFile('c:\BOOTLOG.TXT',... 阅读全文
posted @ 2008-02-11 08:38 万一 阅读(24316) 评论(19) 推荐(2)