Delphi Pubic Function
function GetFileSizeString(const pFileName: String):String;
var
iFileSize: Int64;
begin
Result := '0';
iFileSize := FileSizeByName(pFileName);
Result := IntToStr(iFileSize);
end;
function WinExecAndWait(strFileName: string; uCmdShow: UINT): DWORD;
var
cAppName: array[0..512] of char;
cCurDir: array[0..255] of char;
strWorkDir: string;
StartupInfo: TStartupInfo;
ProcessInfo: TProcessInformation;
begin
StrPCopy(cAppName, strFileName);
GetDir(0, strWorkDir);
StrPCopy(cCurDir, strWorkDir);
FillChar(StartupInfo, Sizeof(StartupInfo), #0);
StartupInfo.cb := SizeOf(StartupInfo);
StartupInfo.dwFlags := STARTF_USESHOWWINDOW;
StartupInfo.wShowWindow := uCmdShow;
if not CreateProcess(nil, cAppName, nil, nil, true, CREATE_NEW_CONSOLE or NORMAL_PRIORITY_CLASS,
nil, nil, StartupInfo, ProcessInfo) then
Result := INFINITE
else
begin
WaitforSingleObject(ProcessInfo.hProcess, INFINITE);
GetExitCodeProcess(ProcessInfo.hProcess, Result);
CloseHandle(ProcessInfo.hProcess);
CloseHandle(ProcessInfo.hThread);
end;
end;
相关文档:
一、整数类型
类型 所占字节数 取值范围
byte 1 0-255
word 2 0-65535
shortint 1 -128-127
smallint 2 -32768-32767
integer 4 -214748648-214748467
longint 4 -214748648-214748467
cordinal 4 0-2147483647
二、实数类型
类型 所点字节数 取值范围
Real 6 ±2.9×10的负39次方到1.7× ......
unit Servicescontrol;
interface
uses Windows,Messages,SysUtils,Winsvc,Dialogs;
function StartServices(Const SvrName:String):Boolean;
function StopServices(Const SvrName:String):Boolean;
function QueryServiceStatu(Const SvrName:  ......
今天在大理剑川做监控联网工程,遇到2台DIY的PC-DVR,联网很不顺利。机器的软件是盗版破解的,只破解了服务器端,客户端未破解,还有就是版本也不对。最后发现软件下有一ActiveX控件可以做联网使用,于是想把这个OCX引入项目软件工程。在引入的时候delphi提示coreide70.bpl报错,错误代码:00000019 ......
Ctrl+PageUp 将光标移至本屏的第一行,屏幕不滚动。
Ctrl+PageDown 将光标移至本屏的最后一行,屏幕不滚动。
Ctrl+↓ 向下滚动屏幕,光标跟随滚动不出本屏。
Ctrl+↑ &nb ......