287 lines
11 KiB
Plaintext
287 lines
11 KiB
Plaintext
unit utslvclmemstruct;
|
|
{**
|
|
@explan(说明) 接口内存管理类 %%
|
|
@date(20220429) %%
|
|
**}
|
|
interface
|
|
uses cstructurelib;
|
|
type TCREATESTRUCT=class(tslcstructureobj)
|
|
private
|
|
static SSTRUCT;
|
|
function getstruct()
|
|
begin
|
|
if not SSTRUCT then SSTRUCT := MemoryAlignmentCalculate(array(
|
|
("lpcreateparams","intptr",0),
|
|
("hinstance","intptr",0),
|
|
("hmenu","intptr",0),
|
|
("hwndparent","intptr",0),
|
|
("cy","int",0),
|
|
("cx","int",0),
|
|
("y","int",0),
|
|
("x","int",0),
|
|
("style","int",0),
|
|
("lpszname","char*",100),
|
|
("lpszclass","char*",100),
|
|
("dwexstyle","int",0)));
|
|
return SSTRUCT;
|
|
end
|
|
public
|
|
function create(ptr)
|
|
begin
|
|
inherited create(getstruct(),ptr);
|
|
end
|
|
property lpcreateparams index "lpcreateparams" read _getvalue_ write _setvalue_;
|
|
property hinstance index "hinstance" read _getvalue_ write _setvalue_;
|
|
property hmenu index "hmenu" read _getvalue_ write _setvalue_;
|
|
property hwndparent index "hwndparent" read _getvalue_ write _setvalue_;
|
|
property cy index "cy" read _getvalue_ write _setvalue_;
|
|
property cx index "cx" read _getvalue_ write _setvalue_;
|
|
property y index "y" read _getvalue_ write _setvalue_;
|
|
property x index "x" read _getvalue_ write _setvalue_;
|
|
property style index "style" read _getvalue_ write _setvalue_;
|
|
property lpszname index "lpszname" read _getvalue_ write _setvalue_;
|
|
property lpszclass index "lpszclass" read _getvalue_ write _setvalue_;
|
|
property dwexstyle index "dwexstyle" read _getvalue_ write _setvalue_;
|
|
end
|
|
type TScrollinfo = class(tslcstructureobj) //滚动条
|
|
private
|
|
static SSTRUCT;
|
|
function getstruct()
|
|
begin
|
|
if not SSTRUCT then SSTRUCT :=
|
|
MemoryAlignmentCalculate(
|
|
array(
|
|
("cbsize","int",0),
|
|
("fmask","int",0),
|
|
("nmin","int",0),
|
|
("nmax","int",0),
|
|
("npage","int",0),
|
|
("npos","int",0),
|
|
("ntrackpos","int",0)));
|
|
return SSTRUCT;
|
|
end
|
|
public
|
|
function create(ptr)
|
|
begin
|
|
inherited create(getstruct(),ptr);
|
|
cbsize := _size_();
|
|
end
|
|
property cbsize:integer index "cbsize" read _getvalue_ write _setvalue_;
|
|
property fmask:integer index "fmask" read _getvalue_ write _setvalue_;
|
|
property nmin:integer index "nmin" read _getvalue_ write _setvalue_;
|
|
property nmax:integer index "nmax" read _getvalue_ write _setvalue_;
|
|
property npage:integer index "npage" read _getvalue_ write _setvalue_;
|
|
property npos:integer index "npos" read _getvalue_ write _setvalue_;
|
|
property ntrackpos:integer index "ntrackpos" read _getvalue_ write _setvalue_;
|
|
end
|
|
type Ttagdrawtextparams=class(tslcstructureobj)
|
|
private
|
|
static SSTRUCT;
|
|
class function getstruct()
|
|
begin
|
|
if not SSTRUCT then SSTRUCT := MemoryAlignmentCalculate(array(("cbsize","int",0)
|
|
,("itablength","int",4)
|
|
,("ileftmargin","int",0)
|
|
,("irightmargin","int",0)
|
|
,("uilengthdrawn","int",0)
|
|
));
|
|
return SSTRUCT;
|
|
end
|
|
public
|
|
function create(ptr)
|
|
begin
|
|
inherited create(getstruct(),ptr);
|
|
cbsize := _size_();
|
|
end
|
|
property cbsize index "cbsize" read _getvalue_ write _setvalue_;
|
|
property itablength index "itablength" read _getvalue_ write _setvalue_;
|
|
property ileftmargin index "ileftmargin" read _getvalue_ write _setvalue_;
|
|
property irightmargin index "irightmargin" read _getvalue_ write _setvalue_;
|
|
property uilengthdrawn index "uilengthdrawn" read _getvalue_ write _setvalue_;
|
|
end
|
|
type TSTYLESTRUCT = class(tslcstructureobj) //样式相关
|
|
private
|
|
static SSTRUCT;
|
|
function getstruct()
|
|
begin
|
|
if not SSTRUCT then SSTRUCT := MemoryAlignmentCalculate(
|
|
array(
|
|
("styleold","int",0),
|
|
("stylenew","int",0)));
|
|
return SSTRUCT;
|
|
end
|
|
public
|
|
function create(ptr)
|
|
begin
|
|
inherited create(getstruct(),ptr);
|
|
end
|
|
property styleold index "styleold" read _getvalue_ write _setvalue_ ;
|
|
property stylenew index "stylenew" read _getvalue_ write _setvalue_ ;
|
|
end
|
|
|
|
type tvclwindowpos_class= class(tslcstructureobj) //窗口位置信息
|
|
private
|
|
static SSTRUCT;
|
|
function getstruct();
|
|
begin
|
|
if not SSTRUCT then
|
|
begin
|
|
SSTRUCT := MemoryAlignmentCalculate(
|
|
array(("hwndinsertafter","intptr",0),
|
|
("hwnd","intptr",0),
|
|
("x","int",0),
|
|
("y","int",0),
|
|
("cx","int",0),
|
|
("cy","int",0),
|
|
("flags","int",0)));
|
|
end
|
|
return SSTRUCT;
|
|
end
|
|
public
|
|
function create(ptr);override;
|
|
begin
|
|
inherited create(getstruct(),ptr);
|
|
end
|
|
property x:integer index "x" read _getvalue_ write _setvalue_;
|
|
property y:integer index "y" read _getvalue_ write _setvalue_;
|
|
property cx:integer index "cx" read _getvalue_ write _setvalue_;
|
|
property cy:integer index "cy" read _getvalue_ write _setvalue_;
|
|
property flags:integer index "flags" read _getvalue_ write _setvalue_;
|
|
property hwndinsertafter:integer index "hwndinsertafter" read _getvalue_ write _setvalue_;
|
|
property hwnd:integer index "hwnd" read _getvalue_ write _setvalue_;
|
|
end
|
|
|
|
type Ttagminmaxinfo=class(tslcstructureobj) //窗口大小相关
|
|
private
|
|
static SSTRUCT;
|
|
class function getstruct()
|
|
begin
|
|
if not SSTRUCT then SSTRUCT := MemoryAlignmentCalculate(array(
|
|
("ptreserved","int[2]",
|
|
(0,0)),
|
|
("ptmaxsize","int[2]",
|
|
(0,0)),
|
|
("ptmaxposition","int[2]",
|
|
(0,0)),
|
|
("ptmintracksize","int[2]",
|
|
(0,0)),
|
|
("ptmaxtracksize","int[2]",
|
|
(0,0))));
|
|
return SSTRUCT;
|
|
end
|
|
public
|
|
function create(ptr)
|
|
begin
|
|
inherited create(getstruct(),ptr);
|
|
end
|
|
property ptreserved index "ptreserved" read _getvalue_ write _setvalue_;
|
|
property ptmaxsize index "ptmaxsize" read _getvalue_ write _setvalue_;
|
|
property ptmaxposition index "ptmaxposition" read _getvalue_ write _setvalue_;
|
|
property ptmintracksize index "ptmintracksize" read _getvalue_ write _setvalue_;
|
|
property ptmaxtracksize index "ptmaxtracksize" read _getvalue_ write _setvalue_;
|
|
end
|
|
/////////////////////////////windows进程相关结构体//////////
|
|
type T_startupinfoa=class(tslcstructureobj)
|
|
private
|
|
static SSTRUCT;
|
|
class function getstruct()
|
|
begin
|
|
if not SSTRUCT then SSTRUCT := MemoryAlignmentCalculate(array(
|
|
("cb","int",0),
|
|
("lpreserved","intptr",0),
|
|
("lpdesktop","intptr",0),
|
|
("lptitle","intptr",0),
|
|
("dwx","int",0),
|
|
("dwy","int",0),
|
|
("dwxsize","int",0),
|
|
("dwysize","int",0),
|
|
("dwxcountchars","int",0),
|
|
("dwycountchars","int",0),
|
|
("dwfillattribute","int",0),
|
|
("dwflags","int",0),
|
|
("wshowwindow","short",0),
|
|
("cbreserved2","short",0),
|
|
("lpreserved2","intptr",0),
|
|
("hstdinput","intptr",0),
|
|
("hstdoutput","intptr",0),
|
|
("hstderror","intptr",0)));
|
|
return SSTRUCT;
|
|
end
|
|
public
|
|
function create(ptr)
|
|
begin
|
|
inherited create(getstruct(),ptr);
|
|
cb := _size_();
|
|
end
|
|
property cb index "cb" read _getvalue_ write _setvalue_;
|
|
property lpreserved index "lpreserved" read _getvalue_ write _setvalue_;
|
|
property lpdesktop index "lpdesktop" read _getvalue_ write _setvalue_;
|
|
property lptitle index "lptitle" read _getvalue_ write _setvalue_;
|
|
property dwx index "dwx" read _getvalue_ write _setvalue_;
|
|
property dwy index "dwy" read _getvalue_ write _setvalue_;
|
|
property dwxsize index "dwxsize" read _getvalue_ write _setvalue_;
|
|
property dwysize index "dwysize" read _getvalue_ write _setvalue_;
|
|
property dwxcountchars index "dwxcountchars" read _getvalue_ write _setvalue_;
|
|
property dwycountchars index "dwycountchars" read _getvalue_ write _setvalue_;
|
|
property dwfillattribute index "dwfillattribute" read _getvalue_ write _setvalue_;
|
|
property dwflags index "dwflags" read _getvalue_ write _setvalue_;
|
|
property wshowwindow index "wshowwindow" read _getvalue_ write _setvalue_;
|
|
property cbreserved2 index "cbreserved2" read _getvalue_ write _setvalue_;
|
|
property lpreserved2 index "lpreserved2" read _getvalue_ write _setvalue_;
|
|
property hstdinput index "hstdinput" read _getvalue_ write _setvalue_;
|
|
property hstdoutput index "hstdoutput" read _getvalue_ write _setvalue_;
|
|
property hstderror index "hstderror" read _getvalue_ write _setvalue_;
|
|
end
|
|
|
|
type T_process_information=class(tslcstructureobj)
|
|
private
|
|
static SSTRUCT;
|
|
class function getstruct()
|
|
begin
|
|
if not SSTRUCT then SSTRUCT := MemoryAlignmentCalculate(array(
|
|
("hprocess","intptr",0),
|
|
("hthread","intptr",0),
|
|
("dwprocessid","int",0),
|
|
("dwthreadid","int",0)));
|
|
return SSTRUCT;
|
|
end
|
|
public
|
|
function create(ptr)
|
|
begin
|
|
inherited create(getstruct(),ptr);
|
|
end
|
|
property hprocess index "hprocess" read _getvalue_ write _setvalue_;
|
|
property hthread index "hthread" read _getvalue_ write _setvalue_;
|
|
property dwprocessid index "dwprocessid" read _getvalue_ write _setvalue_;
|
|
property dwthreadid index "dwthreadid" read _getvalue_ write _setvalue_;
|
|
end
|
|
|
|
type T_security_attributes=class(tslcstructureobj)
|
|
private
|
|
static SSTRUCT;
|
|
class function getstruct()
|
|
begin
|
|
if not SSTRUCT then SSTRUCT := MemoryAlignmentCalculate(array(
|
|
("nlength","int",0),
|
|
("lpsecuritydescriptor","intptr",0),
|
|
("binherithandle","int",0)));
|
|
return SSTRUCT;
|
|
end
|
|
public
|
|
function create(ptr)
|
|
begin
|
|
inherited create(getstruct(),ptr);
|
|
nlength := _size_();
|
|
end
|
|
property nlength index "nlength" read _getvalue_ write _setvalue_;
|
|
property lpsecuritydescriptor index "lpsecuritydescriptor" read _getvalue_ write _setvalue_;
|
|
property binherithandle index "binherithandle" read _getvalue_ write _setvalue_;
|
|
end
|
|
implementation
|
|
|
|
initialization
|
|
|
|
|
|
|
|
|
|
end. |